Datagrid ComboBox data repetition

I have made a datagrid and a column which has a ComboBox
control which references a fixe length and data array to display
the dropdown in the grid column. The problemis this array has to be
repeated for every row of data in the grid.
Is there anyway to make the drop down array just on list and
referenced on the dropdown Combox column no matter how many records
there?

Hello Greg,
I think I may have answered with your help my own question:
I recoded the array as follows (and added a TextInput column
in the example):
This way I don't have to repeat the fixed 'aa' array in the
{lst} with literals.
Also I didnt understand that the DataGrid can had a different
dp from the components. Is that right?

Similar Messages

  • (URGENT) Skining problem of components (datagrid & combobox)

    Hi,
    I m using FLASH CS3, I used Datagrid and Combobox component from components panel, and simply add some data inside in that.
    setupComboBox();
    function setupComboBox():void
        cb.setSize(200, 22);
        cb.prompt = "Select a Credit Card";
        cb.addItem( { label: "MasterCard", data:1 } );
        cb.addItem( { label: "Visa", data:2 } );
        cb.addItem( { label: "American Express", data:3 } );
    import fl.controls.DataGrid;
    import fl.controls.dataGridClasses.DataGridColumn;
    import fl.data.DataProvider;
    import fl.events.DataGridEvent
    var dp:DataProvider = new DataProvider();
    dp.addItem({col1:"item 1.A", col2:"item 1.B", col3:"item 1.C"});
    dp.addItem({col1:"item 2.A", col2:"item 2.B", col3:"item 2.C"});
    dp.addItem({col1:"item 3.A", col2:"item 3.B", col3:"item 3.C"});
    dp.addItem({col1:"item 4.A", col2:"item 4.B", col3:"item 4.C"});
    myDataGrid.addColumn("col1");
    myDataGrid.addColumn("col2");
    myDataGrid.addColumn("col3");
    myDataGrid.dataProvider = dp;
    myDataGrid.setSize(300, 200);
    myDataGrid.move(10, 10);
    It seems working fine.
    My problem is , I want two different type of skining of two different component(DataGrid & Combobox). in the same fla.
    .. e.g if datagrid have gray color skin type and combobox have black color skin type.
    Can any one have any Idea?

    Thanks for reply..
    @kennethkawamoto2
    I already implemented that thing , that u suggest, The Main problem of this component is CellRenderer,  what's the solution of it ?
    If i apply this
    cb.setStyle("upSkin", ComboBox_upSkin2);
    cb.setStyle("overSkin", ComboBox_overSkin2);
    cb.setStyle("downSkin", ComboBox_downSkin2);
    Its change the header of Comobo box pattern, but the rest part e.g cell  is remaining  the same.
    I  tried like this also
    cb.setStyle("upSkin",CellRenderer_upSkin2)
    cb.setStyle("downSkin",CellRenderer_downSkin2)
    cb.setStyle("overSkin",CellRenderer_overSkin2)
    cb.setStyle("disabledSkin",CellRenderer_disabledSkin2)
    cb.setStyle("selectedDisabledSkin",CellRenderer_selectedDisabledSkin2)
    cb.setStyle("selectedUpSkin",CellRenderer_selectedUpSkin2)
    cb.setStyle("selectedDownSkin",CellRenderer_selectedDownSkin2)
    cb.setStyle("selectedOverSkin",CellRenderer_selectedOverSkin2)
    but it gives error........
    TypeError: Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/addChildAt()
        at fl.controls::BaseButton/drawBackground()
        at fl.controls::LabelButton/draw()
        at fl.core::UIComponent/drawNow()
        at fl.controls::List/drawList()
        at fl.controls::List/draw()
        at fl.core::UIComponent/drawNow()
        at fl.controls::List/scrollToIndex()
        at fl.controls::SelectableList/scrollToSelected()
        at fl.controls::ComboBox/open()
        at fl.controls::ComboBox/onToggleListVisibility()
    When u click on combobox to open it up. The Component Assets  of datagrid and combobox are the same so I am not able to apply different skin pattern of this two different component ..
    Still is there any way pls let me ..

  • FB4b1: Datagrid with data driven Combobox

    Hi,
    I would like to implement a datagrid with a datadriven combox in FB4b1.
    The database should store "only" values, but should show a different labeltext in the grid.
    When the users load this Grid the stores values should be uses to set the comboboxes.
    That sounds easy but I haven't found a easy way to implement that!
    1.) I need to overrite the "save column" function, so that the shown labeltext is not saved, but its db-values.
    How can I do this?
    2.) I need to build the combox in the datagrid, but there is nnothing like"combox.value="myValID" ( that would be all in vb.net)
    Do I have to loop manually over the selectedIndex until I found my savedValue?
    Like
    http://www.boyzoid.com/blog/index.cfm/2006/11/22/Flex-Custom-Components-and-Custom-Methods
    Is there an easier way to do this?
    Thanks for any pointers!
    Martin Zach

    Each item in comobobox has a label and a data value associated with it.
    The following should work if you were to access data of a selected combo box item, without looping through the items. If it is a string value then
    mylabel.text = myCombo.selectedItem.data.toString() would show / store the associated data with the combobox item for the label text, you can replace mylabel with the datagrid's dataprovider for your requirements.
    Hope this helps
    -Sunil

  • Dynamic dataprovider in Datagrid combobox.

    Hi,
    i am using Flex 3. I have a data grid with first two rows having item renderers as ComboBoxes. What i want to implement is that, depending on my selection in the first combobox, the respective second combobox should get a dataprovider of my choice.
    For e.g.
    If I select the 1st combobox as India, then the adjacent combobox should have the cities in India.
    If I select the 1st combobox as France, then the adjacent combobox should have the cities in France.
    I dont have the values in any local variables. The values must be fetched at runtime because the list of Countries(in first combobox) is very exaustive so fetching the list of all cities for all countries would not be right. So for each selection of country i have to make an http service call to fetch the corresponding city list.
    My question is how do i dynamically give the cities as dataprovider to each of the combo boxes in each row.
    Hope my description is comprehensible enough.
    Thanks
    Sid.

    HI,
    Can you check the below code. If that is what you need.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                     layout="vertical"
                     creationComplete="application1_initializeHandler(event)">
         <mx:Script>
             <![CDATA[
                 import mx.collections.ArrayCollection;
                 import mx.events.FlexEvent;
                 // Defines your collections
                 [Bindable]
                 public var countriesData:ArrayCollection=new ArrayCollection([{label: 'India'}, {label: 'Brazil'}]);
                 [Bindable]
                 public var citiesData:ArrayCollection;
                 [Bindable]
                 public var collection:ArrayCollection=new ArrayCollection();
                 protected function application1_initializeHandler(event:FlexEvent):void
                     dataGrid.addEventListener("countryChanged", country_changed_handler);
                     collection.addItem({cityData:citiesData});
                // Change this method to the remote callings.
                // In the resultEvent you will change the citiesData collection.
                 protected function country_changed_handler(event:DataEvent):void
                     if (event.data == 'India')
                         dataGrid.selectedItem.cityData = new ArrayCollection([{label: 'Mumbai'}, {label: 'Delhi'}]);
                     else
                         dataGrid.selectedItem.cityData = new ArrayCollection([{label: 'São Paulo'}, {label: 'Rio de Janeiro'}]);
                     dataGrid.invalidateList();
                 public function addRow(event:MouseEvent):void{
                     //collection.addItem(new Object());
                     collection.addItem({cityData:citiesData});
                 public function dropRow(event:MouseEvent):void{
             ]]>
         </mx:Script>
         <mx:DataGrid id="dataGrid"
                      dataProvider="{collection}">
             <mx:columns>
                 <mx:DataGridColumn>
                     <mx:itemRenderer>
                         <mx:Component>
                             <mx:ComboBox dataProvider="{this.parentDocument.countriesData}"
                                          labelField="label"
                                          change="combobox1_changeHandler(event)"
                                          selectedIndex="-1">
                                 <mx:Script>
                                     <![CDATA[
                                         import mx.collections.ArrayCollection;
                                         import mx.events.ListEvent;
                                        protected function combobox1_changeHandler(event:ListEvent):void
                                             dispatchEvent(new DataEvent("countryChanged", true, true, this.selectedLabel));
                                     ]]>
                                 </mx:Script>
                             </mx:ComboBox>
                         </mx:Component>
                     </mx:itemRenderer>
                 </mx:DataGridColumn>
                 <mx:DataGridColumn>
                     <mx:itemRenderer>
                         <mx:Component>
                             <mx:ComboBox labelField="label">
                                 <mx:Script>
                                     <![CDATA[
                                              override public function set data(value:Object):void
                                                super.data = value;
                                                var prevSelectedItem:Object = this.selectedItem;
                                                this.dataProvider = data.cityData ;
                                                this.selectedItem = prevSelectedItem;
                                     ]]>
                                 </mx:Script>
                             </mx:ComboBox>
                         </mx:Component>
                     </mx:itemRenderer>
                 </mx:DataGridColumn>
             </mx:columns>
         </mx:DataGrid>
         <mx:HBox width="299" horizontalAlign="center" horizontalGap="51">
             <mx:Button label="Add" click="addRow(event)"/>
             <mx:Button label="Drop" click="dropRow(event)"/>
         </mx:HBox>
    </mx:Application>

  • DataGrid ComboBox itemRenderer/editor not updating dataProvider properly

    I have a DataGrid with one column using a ComboBox as the itemRenderer. The column is editable but if you trace the dataProvider, the changes lag behind by one. So uncheck two row's ComboBox and the dataProvider only shows one row's data updated.
    Any ideas?

    Yep, its a CheckBox, too early in the morning.
    Another component (DataGrid) will be filtered depending on what rows in the ADG have their CheckBox checked, so leaving the row may be too late.
    Here is the code I have so far. In the itemEditEnd event handler I'm trying to set the field in the dataProvider manually, but it causes an infinite loop. preventDefault and stopImmediatePropagation don't help.
    ----- CheckBoxRenderer.mxml -----
    <?xml version="1.0"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.controls.CheckBox;
          [Bindable] public var newSelected:Boolean;
        ]]>
      </mx:Script>
      <mx:CheckBox id="selectedChbx" selected="{data.FLAG}"/>
    </mx:VBox>
    ----- mainapp.mxml -----
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.events.AdvancedDataGridEvent;
          import mx.collections.ArrayCollection;
          import mx.controls.CheckBox;
          [Bindable] private var transactions:ArrayCollection = new ArrayCollection([
            {orderID: "33725", theirOrderNumber: "10170", name: "Bob Smith", SKUs: "21", PICKS: "50", FLAG: "true"},
            {orderID: "33729", theirOrderNumber: "10172", name: "Mary Wilson", SKUs: "3", PICKS: "6", FLAG: "true"},
            {orderID: "33730", theirOrderNumber: "10176", name: "Fred Carson", SKUs: "1", PICKS: "2", FLAG: "true"},
            {orderID: "33731", theirOrderNumber: "10177", name: "Morten Hills", SKUs: "5", PICKS: "16", FLAG: "true"},
            {orderID: "33732", theirOrderNumber: "10178", name: "Bill Trundy", SKUs: "5", PICKS: "34", FLAG: "true"},
            {orderID: "33734", theirOrderNumber: "10179", name: "Ocean Boat Supply", SKUs: "8", PICKS: "19", FLAG: "true"},
            {orderID: "33736", theirOrderNumber: "10180", name: "Janet Aberdine", SKUs: "5", PICKS: "18", FLAG: "true"},
            {orderID: "33737", theirOrderNumber: "10181", name: "Kim Restine", SKUs: "2", PICKS: "6", FLAG: "true"},
            {orderID: "33738", theirOrderNumber: "10182", name: "Thomas Overby", SKUs: "5", PICKS: "12", FLAG: "true"}
          public function handleGridChanged(evt:AdvancedDataGridEvent):void{
            var newData:Boolean = CheckBoxRenderer(evt.currentTarget.itemEditorInstance).newSelected;
            trace(evt.rowIndex);
            var obj:Object = transactions.getItemAt(evt.rowIndex);
            trace("BEFORE: " + obj.FLAG);
            obj.FLAG = newData;
            trace("AFTER: " + obj.FLAG);
            transactions.setItemAt(obj, evt.rowIndex);
            return;
            evt.preventDefault();
            evt.stopImmediatePropagation();
    //        for each(var item:Object in transactions){
              //trace(item.FLAG);
        ]]>
      </mx:Script>
      <mx:Label fontSize="12" text="Bulk Print / Pull - Step 1"/>
      <mx:HBox>
        <mx:AdvancedDataGrid id="dgTransactions" dataProvider="{transactions}"
          fontSize="12" editable="true" sortableColumns="true" height="500"
          width="100%" itemEditEnd="handleGridChanged(event);">
            <mx:columns>
              <mx:AdvancedDataGridColumn dataField="orderID" headerText="WMSOID" width="100"
                editable="false" textAlign="center"/>
              <mx:AdvancedDataGridColumn dataField="theirOrderNumber" headerText="Order #"
                textAlign="center" width="130" editable="false"/>
              <mx:AdvancedDataGridColumn dataField="name" headerText="Customer"
                width="125" textAlign="left" editable="false"/>
              <mx:AdvancedDataGridColumn dataField="SKUs" headerText="SKU's"
                width="75" textAlign="right" editable="false"/>
              <mx:AdvancedDataGridColumn dataField="PICKS" headerText="Picks"
                width="75" textAlign="right" editable="false"/>    
              <mx:AdvancedDataGridColumn dataField="FLAG" headerText="I" width="20" textAlign="center"
                editable="true" rendererIsEditor="true" editorDataField="newSelected"
                itemRenderer="CheckBoxRenderer"/>
            </mx:columns>
        </mx:AdvancedDataGrid>
        <mx:DataGrid>
        </mx:DataGrid>
      </mx:HBox>
    </mx:Application>

  • Datagrid combobox as itemrenderer problem.

    Hi All,
         I have different problem. i have a datagrid with10-20 rows. Different item renderers in all columns(6 - 10 columns). In that a single column has combobox as item rederer.
         I have to serve different dataprovider for each row's combobox. I assigned dataprovider by overriding data property. is this right?.
         while my datagrid has scrollbar frequently my rows are refreshing. This makes bad my app.
         Please help me.

    Yes, what you are doing is right, if you think that once the data provider is set on the combobox, and it does not change(except the selected value) then do not assign the data provider from override.
    I would create a dirty flag in the combo itemrend and set this to true once the dataprovider is set on the combo, and will not set the dp again when the override data is called by looking at this dirty flag.

  • DataGrid Combobox dataprovider erasing items

    I have a DataGrid that is linked to an array of custom data objects which I call a seriesList.  You are supposed to be able to choose the name of each series via a combobox in the datagrid.  It works fine except when the user selects the combobox and then clicks somewhere else in the interface, which closes the combobox and erases whichever item is previously selected!
    <!--  Definition in application  -->
    <!--  axis.seriesList is and ArrayCollection of actionscript objects called SeriesObjects which have a var name:String variable -->
    <mx:DataGrid id="seriesTable" color="black" fontSize="9" rowHeight="30" editable="true" resizeEffect="slow" rollOverColor="#CCCCCC"
        selectionColor="#999999" dataProvider="{axis.seriesList}" width="100%"
        rowCount="{axis.seriesList.length > 2 ? axis.seriesList.length : 2}" >
            <mx:columns>  
                 <mx:DataGridColumn dataField="name" headerText="Name" width="280" headerStyleName="centered" id="nameColumn"
                         rendererIsEditor="true"  editorDataField="result" itemRenderer="renderer.SeriesBoxRenderer"/>
            </mx:columns>
    </mx:DataGrid>
    <!--  SeriesBoxRenderer -->
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" horizontalAlign="center">
       <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                // Define a property for returning the new value to the cell.
                public var result:String="";
                [Bindable]
                private var dpValue:ArrayCollection;
                private function init():void {
                    // list of possible names to choose from for this series
                    dpValue = mx.core.Application.application.seriesArray;
                // Override the set method for the data property.
                override public function set data(value:Object):void {
                    if (dpValue == null) init();
                    super.data = value;
                    if (value != null)     {
                        var currentValue:String = value.name;
                        var len:int = dpValue.length;
                        for (var i:int = 0; i < len; i++) {
                            if (dpValue[i].name == currentValue) {
                                editor.selectedIndex = i;
                                return;
                    editor.selectedIndex = 0;            }
                public function onChange():void {
                    var index:int = editor.selectedIndex;
                    result = dpValue[index].name;
                    data.name = dpValue[index].name;
            ]]>
        </mx:Script>
         <mx:ComboBox id="editor" textAlign="left" labelField="name" dataProvider="{dpValue}"  change="onChange()"/>
    </mx:VBox>

    I'm thinking the problem may be the dataprovider for the combobox.  This array is also shared with another List component in another tab on the interface.  The reason I am thinking this is because I have another item renderer which uses a combobox and does not erase itself when you click nothing.  Here is the code for that item, and the only difference I can see between this code and the code that doesn't work is the fact that the dataprovider is shared with another part of the code.  Still not sure how to fix this, however.
              [Bindable]
                private var dpValue:ArrayCollection;
                private function init():void {
                    dpValue = mx.core.Application.application.aquisitionOptions.lastResult.system.data;
                    for ( var i:int=0; i<dpValue.length; i++ )  {  //loop over the items in the dataProvider
                       if (dpValue[i].id == data.aquisitionID)  {  //compare desired value to current item.data value
                            editor.selectedIndex = i;  //set the seletedIndex of the combo box
                            data.aquisitionDescr = dpValue[i].name;
                            break;
              // Override the set method for the data property.
                override public function set data(value:Object):void {
                    super.data = value;
                    if (dpValue == null) init();
                    if (value != null)     {        
                        var currentValue:String = value.aquisitionDescr;
                        trace ("\n current:  ", currentValue);
                        var len:int = dpValue.length;
                        for (var i:int = 0; i < len; i++) {
                            if (dpValue[i].name == currentValue) {
                                editor.selectedIndex = i;
                                return;
                    editor.selectedIndex = 0;
                public function onChange():void {
                    var index:int = editor.selectedIndex;
                    result = dpValue[index].name;
                    data.aquisitionDescr = dpValue[index].name;
                    data.aquisitionID = editor.selectedItem.id as String;
            ]]>
        </mx:Script>
         <mx:ComboBox id="editor" labelField="name" dataProvider="{dpValue}" change="onChange()"/>
    <!-- definition in the datagrid -->
    <mx:DataGridColumn dataField="aquisitionDescr" headerText="Data Aquisition" width="160" headerStyleName="centered" id="acquisitionColumn"
                         rendererIsEditor="true"  editorDataField="result" itemRenderer="renderer.AquisitionBoxRenderer"/>

  • DataGrid/ComboBox/ItemEditor

    Hi all,
    I've got a DataGrid, "dg", whose dataprovider is set to an
    array of "thing" objects.
    Each row then has several columns using a custom renderer, a
    canvas containing a combobox. The combobox's dataprovider is set to
    thing's array of "subthing" objects. The editorDataField for each
    row is set to "selectedItem".
    When a combobox is changed, I need to set Thing.subthing =
    combobox.selectedItem. Unfortunately I can't make this happen.
    If I don't include a "selectedItem" variable within the MXML
    component definition, I get the following RTE on focus out of the
    combobox:
    ReferenceError: Error #1069: Property selectedItem not found
    on renderers.worksheet.SubThingComboBox and there is no default
    value.
    Once I add selectedItem, then I get this RTE:
    ReferenceError: Error #1069: Property null not found on Thing
    and there is no default value.
    Basically, how do I map the selectedItem of the combobox to
    Thing.subThing?

    The override set data() method returns a reference to the
    current "thing". On combo box change, you can use this reference to
    set the property in the thing item.
    If you do not know what the "overide set data()" method is,
    you need to study some more on itemRenderers. There are several
    examples on cflex.net and many elsewhere on the net.
    Tracy

  • Creating hyperlink on DataGrid Cell Data

    Hi All,
    Having created a Datagrid with displays Product names in the 1st column, is it possible to create individual hyperlinks on the data in this column. The result would be that when the User clicks on any one of the Product names a Internet Explorer browser window would open showing more details about the Product selected?
    Thanks,
    J

    Here is my column definition for a link:
    <mx:DataGridColumn
    headerText="View" dataField="link" width="50" editable="
    false" textAlign="center">
    <mx:itemRenderer>
    <fx:Component>
    <mx:LinkButton label=". . ." color="blue" fontSize="16" fontWeight="
    bold">
    </mx:LinkButton>
    </fx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    You will need to set a click listener for LinkButton. To open a new window I use this:
    reportString =
    "window.open('" + reportString + "',
    ShipInfo', 'status=0,toolbar=0,resizable=yes')";ExternalInterface.call(reportString);
    Basically it is a JavaScript window.open method.
    HTH

  • Datagrid combobox itemEditor event

    I have a datagrid populated by managed arraycollection by
    dataservice. One of the columns has an item Editor using a
    component ComboBox. Sofar all is fine but I have not been able to
    define an event that will be triggered when the combobox has
    changed and a new value is selected. I have tried itemEditEnd which
    will only trigger if one clicks outside the itemEditor which
    generates an "other" event. "Change" method of DG will trigger an
    event before any selection is made. Any ideas? I need the trigger
    to commit the change to database.
    Thx

    Hi,
    I'm sorry to bug you with a non-technical discussion, but I
    am a recruiter in San Diego. My client is in need of 3 Senior Flex
    Developers for their project. I have had an extremely rough time
    finding someone for this position. Would you be interested in this
    position, or do you know of anyone that might be? We do pay
    referral fees. This position may be open to telecommuting.
    Job Description:
    They are in the midst of a major re-architecting of their
    Corporate Management system utilizing many cutting edge
    technologies. As it relates to the position they are using Flex as
    their UI.
    This is either a contract, or a full-time position.
    Pay: Market Rate
    Thanks for your help!
    Natalie Fay
    Outsource Technical
    www.ostechnical.com
    [email protected]
    858.874.5637

  • Data repetition from Query

    Hi there,
    I have this query which joins two tables
    procedure get_monthly_cpl(p_cursor OUT rst_cur, searchcode IN VARCHAR2, in_date IN VARCHAR2)
    is
    begin
    open p_cursor for
    SELECT C1.CIPIDI_NR "Number",
    C1.CLAIMANT_NAME "Claimant Name",
    C1.CIPIDI_NAME "Name",
    TO_CHAR(C1.DATE_RECEIVED, 'dd/mm/yyyy') "Date Received" ,
    TO_CHAR(C1.DATE_CLOSED, 'dd/mm/yyyy') "Date Closed" ,
    C2.REPORT_NUMBER "Report Number",
    C2.ISSUE_NUMBER "Issue Number",
    TO_CHAR(C2.ISSUE_DATE, 'dd/mm/yyyy') "Issue Date",
    C1.CONFIDENTIAL_FLAG
    FROM TBL_CIPIDI C1, TBL_ISSUED_REPORTS C2
    WHERE C1.CIPIDI_NR LIKE searchcode
    AND C1.CIPIDI_NR = C2.CIPIDI_NR
    AND trunc(nvl(C1.DATE_CLOSED,TO_DATE(in_date, 'mm/yyyy')),'MONTH') = TO_DATE(in_date, 'mm/yyyy')
    order by C1.CIPIDI_NR;
    end get_monthly_cpl;
    The query works fine but the results have repetitive data:
    B001 Peter Smith BLAH 01/11/1994 15/04/1999 B001 1 01/12/1994
    B001 Peter Smith BLAH 01/11/1994 15/04/1999 BR9815/B001 1 19/03/1998
    B001 Peter Smith BLAH 01/11/1994 15/04/1999 BR9756/B001 1 20/11/1997
    B001 Peter Smith BLAH 01/11/1994 15/04/1999 BR9851/B001 1 15/07/1998
    As you can see this line is repeated:
    B001 Peter Smith BLAH 01/11/1994 15/04/1999
    Only everything afterwards is different. Can I somehow prevent Oracle to repeat this data so the result would look like this?
    B001 Peter Smith BLAH 01/11/1994 15/04/1999
    BR9851/B001 1 15/07/1998
    BR9815/B001 1 19/03/1998
    So it just repeats the data from the joined table until there is a new CIPIDI_NR
    Thank you so much
    Chris

    -- test data:
    scott@ORA92> SELECT * FROM tbl_cipidi
      2  /
    CIPIDI_NR CLAIMANT_NAME CIPIDI_NAME DATE_CLOS DATE_RECE C
    B001      Peter Smith   BLAH        01-NOV-94 15-APR-99
    scott@ORA92> SELECT * FROM tbl_issued_reports
      2  /
    CIPIDI_NR REPORT_NUMBER ISSUE_NUMBER ISSUE_DAT
    B001      B001                     1 01-DEC-94
    B001      BR9815/B001              1 19-MAR-98
    B001      BR9756/B001              1 20-NOV-97
    B001      BR9851/B001              1 15-JUL-98
    -- package with procedure:
    scott@ORA92> CREATE OR REPLACE PACKAGE your_pkg
      2  AS
      3    TYPE rst_cur IS REF CURSOR;
      4    procedure get_monthly_cpl
      5        (p_cursor   OUT rst_cur,
      6         searchcode IN  VARCHAR2,
      7         in_date    IN VARCHAR2);
      8  END your_pkg;
      9  /
    Package created.
    scott@ORA92> SHOW ERRORS
    No errors.
    scott@ORA92> CREATE OR REPLACE PACKAGE BODY your_pkg
      2  AS
      3    procedure get_monthly_cpl
      4        (p_cursor   OUT rst_cur,
      5         searchcode IN  VARCHAR2,
      6         in_date    IN VARCHAR2)
      7    is
      8    begin
      9        open p_cursor for
    10        SELECT DECODE (rn, 1, cipidi_nr    , NULL) AS "Number",
    11            DECODE (rn, 1, claimant_name, NULL) AS "Claimant Name",
    12            DECODE (rn, 1, cipidi_name  , NULL) AS "Name",
    13            DECODE (rn, 1, date_received, NULL) AS "Date Received",
    14            DECODE (rn, 1, date_closed,   NULL) AS "Date Closed",
    15            report_number                   AS "Report Number",
    16            issue_number                   AS "Issue Number",
    17            issue_date                   AS "Issue Date",
    18            confidential_flag
    19        FROM     (SELECT C1.CIPIDI_NR,
    20                 C1.CLAIMANT_NAME,
    21                 C1.CIPIDI_NAME,
    22                 TO_CHAR(C1.DATE_RECEIVED, 'dd/mm/yyyy') AS date_received,
    23                 TO_CHAR(C1.DATE_CLOSED, 'dd/mm/yyyy')     AS date_closed,
    24                 C2.REPORT_NUMBER,
    25                 C2.ISSUE_NUMBER,
    26                 TO_CHAR(C2.ISSUE_DATE, 'dd/mm/yyyy')     AS issue_date,
    27                 C1.CONFIDENTIAL_FLAG,
    28                 ROW_NUMBER () OVER
    29                   (PARTITION BY c1.cipidi_nr
    30                    ORDER BY c2.report_number) AS rn
    31             FROM     TBL_CIPIDI C1, TBL_ISSUED_REPORTS C2
    32             WHERE     C1.CIPIDI_NR LIKE searchcode
    33             AND     C1.CIPIDI_NR = C2.CIPIDI_NR
    34             AND     trunc(nvl(C1.DATE_CLOSED,TO_DATE(in_date, 'mm/yyyy')),'MONTH')
    35                 = TO_DATE(in_date, 'mm/yyyy')
    36             order by C1.CIPIDI_NR);
    37    end get_monthly_cpl;
    38  END your_pkg;
    39  /
    Package body created.
    scott@ORA92> SHOW ERRORS
    No errors.
    -- test:
    scott@ORA92> VARIABLE g_ref REFCURSOR
    scott@ORA92> SET AUTOPRINT ON
    scott@ORA92> EXECUTE your_pkg.get_monthly_cpl (:g_ref, 'B001', '11/1994')
    PL/SQL procedure successfully completed.
    Number    Claimant Name Name        Date Recei Date Close Report Number Issue Number Issue Date C
    B001      Peter Smith   BLAH        15/04/1999 01/11/1994 B001                     1 01/12/1994
                                                              BR9756/B001              1 20/11/1997
                                                              BR9815/B001              1 19/03/1998
                                                              BR9851/B001              1 15/07/1998
    scott@ORA92>

  • Obtaining comboBox data

    Hi there,
    I am trying to figure out how to create the selected data in
    a combo box as a variable in my form.
    Here is a part of my code as an example of what I want to do.
    var orderVariables:URLVariables = new URLVariables();
    orderVariables.custName = textName.text;
    orderVariables.custEmail = textEmail.text;
    orderVariables.custPhone = textPhone.text;
    How do I reference my combobox as an entity of
    orderVariables?
    Thanks
    CM

    I really dont know whats wrong with it. Heres the code for my
    send function:
    function sendOrder(event:MouseEvent):void{
    var orderVariables:URLVariables = new URLVariables();
    orderVariables.custName = textName.text;
    orderVariables.custPetName = textPetName.text;
    orderVariables.custAddress = textAddress.text;
    orderVariables.custSuburb = textSuburb.text;
    orderVariables.custPostcode = textPostcode.text;
    orderVariables.custPhone = textPhone.text;
    orderVariables.custEmail = textEmail.text;
    orderVariables.custTagStyle = tagStyle.selectedItem.data;
    orderVariables.custTagColour = tagColour.selectedItem.data;
    orderVariables.custTagSize = tagSize.selectedItem.data;
    orderVariables.custLine1 = textLine1.text;
    orderVariables.custLine2 = textLine2.text;
    orderVariables.custLine3 = textLine3.text;
    orderVariables.custLine4 = textLine4.text;
    var postOrder:URLRequest = new URLRequest("mailOrder.php");
    postOrder.data = orderVariables;
    postOrder.method = URLRequestMethod.POST;
    var loader:URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.load(postOrder);
    gotoAndStop(2);
    My comboBox's are labelled tagSize, tagColour and tagStyle
    Can you notice anything wrong with this? :\
    Thanks for your help

  • DataGrid with data paging

    Hi,
    I have seen many examples of data paging using a Flex DataGrid: http://www.jamesward.com/2010/10/11/data-paging-in-flex-4/
    This essentially means that as the user scrolls the DataGrid only the data needed  is requested and displayed (essential for m app as users could have 1000's of records). I was wondering if anyone has any examples of doing this with a Flash DataGrid rather than Flex as my project is pure AS3.
    Regards,
    Scott

    hI,
    I've been through these excellent tutorials but none of them seem to load the data on demand, they just load the data all at once rather than when the user scrolls.
    Thanks

  • DataGrid Column/Data alignment

    I have an issue with a DataGrid where I'm trying to align the
    header differently from the data underneath. I would like the
    header to be center-aligned, and the data to be right-aligned, but
    it seems to be all or nothing with textAlign. Has anyone run into
    this and found a way to do it?

    If you have different align values for each column, then I
    think you will need to use a custom headerRenderer as Tracy
    suggested. Here is a sample:
    <mx:DataGridColumn dataField="full_name" width="175"
    textAlign="left">
    <mx:headerRenderer>
    <mx:Component>
    <mx:Label text="Name" textAlign="center"/>
    </mx:Component>
    </mx:headerRenderer>
    </mx:DataGridColumn>
    In this sample, the column textAlign is set to left and the
    header textAlign is set to center in the Label component of the
    headerRenderer.
    I hope this helps.
    Vygo

  • Receive combobox data to another frame

    hi,
      I have combobox in frame 2. how can I receive the selected "string"data when I go in frame 3?
    I thing it can't do that. Must I store data in class and I read then when I go in frame 3.

    Create a layer for actionscript and have it extend the full length of your timeline.  Then just decalre a variable in frame 1, name it whatever you like...
    var comboboxVariable;  // if you know the data type, specify that too
    Then that variable will be available anywhere along the timeline.  You can assign it a value in frame 2 when the combobox is used and read its value in frame 3

Maybe you are looking for

  • Getting *Not all values are bound* error while creating the VO

    Hi When i create a VO with the following query i am getting ORA-01008: not all variables bound error after giving apply. The Query is: SELECT emp.full_name CSA, COUNT(*) "Total # disputes", SUM(rac.total_amount) "Total Dispute Amt", (SELECT COUNT(jtb

  • Help! Changing attachment path in SQL database

    Changing paths in the dbo.dlnk table isn't too difficult, but I came accross something that has me stumped. Rather than a straight forward path such as \\servername\documents\ there are many that have a URL in the path such as http://servername/expon

  • I sadly have a mac 10.4.8 with a 2GB how can I add more memory?

    I really need help because I really need to update this ancient software lol

  • 10.1.3.3.0 Request invoke issue

    Hi, Currently I have 10.1.3.3.0 Linux redhat application server. When I deploy following jsp and invoking from browser http://myname/testJSP, after 5 minutes I can see System.out.println("*****Start**** " ); message again. for example in log file Sys

  • Web Clips in Safari 4?

    So I upgraded to Safari 4, where in the world did my little web clip button go that I had next to my URL bar in Safari 3? It's just not there anymore!!! How do I make a web clip with safari 4?