How to generate checkbox on grouping column in advanced datagrid : flex 3

This is my code .but it generate for all rows. I want checkbox for only where studyid displayed.
<mx:AdvancedDataGrid id="dgList" x="10" y="342" width="1001" height="175" sortExpertMode="true" borderColor="#992958" styleName="invoiceDataGrid">
                <mx:dataProvider>
                    <mx:GroupingCollection id="groupda" source="{CptArr}">
                        <mx:Grouping>
                            <mx:GroupingField name="patientname"></mx:GroupingField>
                            <mx:GroupingField name="studyId"></mx:GroupingField>
                        </mx:Grouping>
                    </mx:GroupingCollection>
                </mx:dataProvider>
                <mx:groupedColumns>
                    <mx:AdvancedDataGridColumn headerText="Patient Details" width="200"/>
                    <mx:AdvancedDataGridColumn dataField="cpt_code_val" headerText="CPT Code" width="100"/>
                    <mx:AdvancedDataGridColumn dataField="cpt_desc" headerText="CPT Description"/>
                    <mx:AdvancedDataGridColumn dataField="modifier" headerText="Modifier" width="100"/>
                    <mx:AdvancedDataGridColumn headerText="Fee Schedule" dataField="fee_schdule" width="100"/>
                    <mx:AdvancedDataGridColumn headerText="select" id="dgselect">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:CheckBox visible="{data.cptdesc}"
                        </mx:Component>
                    </mx:itemRenderer>
                    </mx:AdvancedDataGridColumn>
                </mx:groupedColumns>
            </mx:AdvancedDataGrid>
output:
but i want like this:
Thanks in advance for your help.

Sunil,
Which column is the sal column? I can’t see any numeric columns in your query. If you use htmldb_item calls in your query column, then this makes them strings and you can’t build sums on string columns. If you want to build sums in an updateable report / tabular form, then don’t use the htmldb_item API. Instead use the built-in display types on the report column attributes page. Using the built-in display types is the better options in most cases anyway and they do allow you to calculate sums even if the column is a text field or display and save type field.
Regards,
Marc

Similar Messages

  • Removal of grouping icon on advanced datagrid

    Hi
    Is it possible to remove the folder icon when you having grouping on the advanced datagrid? I ve done some googling but cant find a solution.
    Cheers
    Shaun

    Hi, Nicky
    u can solve this problem by grouping function.
    u create ur dataprovider like
    private var myData:ArrayCollection = new  ArrayCollection([{data1:1, data2:10,......},
                                                                                         {data1:1, data2:21, ....}]);
    u declare the grouping function in following manner
    private function myGroupLabelFunction(item:Object, column:AdvancedDataGridColumn):String
    // here u write ur logice to formatting ur dispalying data in advance grid.
    //suppose ur labelfield of datagrid are data1,data2, data3 respectively.
    return item.data1+"-"+item.data2;
    if u do in this way i think it will work.
    if u sucess then give me mark.
    Thanks
    Niranjan

  • Bargraph,icon and a numeric value, together in a single column of advance datagrid

    Hiii,
    I am trying to embed an icon, a bargraph with two values and a numeric value in a single column of advance datagrid. can anybody help me out in giving a solution for this...I have read a  blog where the code explains about the bargraph in advance datagrid, I want to embed numeric value and icon too including bargraph in the column. I am looking for a Bargraph which  takes two values
    In the above image, the graph and rate is shown in a separate column , I require graph to be shown along with the numeric value and a icon in a single column.
    The blog which i refered and got the above output is placed below, it can be used for the reference.
    http://symmetri.blogsome.com/2009/05/22/render-a-bar-graph-within-a-datagrid/

    RVR,
    This is a great exercise to get familiar with LabVIEW's array functions.  A great place to start is actually the LabVIEW help on arrays, located here:
    http://zone.ni.com/reference/en-XX/help/371361B-01/lvconcepts/grouping_data_with/
    Depending on your data format, you can probably use the Read From Spreadsheet File VI to bring your data into a 2-d array.  You could then use the index array VI to pull your column out.  You could do this in a For loop and use Autoindexing to build your 1,000 column resulting array.  I would leave everything as a String format until I'm done. 
    This doesn't sound like a very difficult task.  Good luck!
    --Paul Mandeltort
    Automotive and Industrial Communications Product Marketing

  • How to update person or group column with peopleeditor control values

    Hi,
    I have created custom aspx page and added "PeopleEditor" control(can select multiple users)  in that page. Now I am trying to update person or group column with peopleeditor control values.I am not getting any error if I select single user
    in PeopleEditor control but getting error if I select more than one user.
    UpdateItem(listItem, "ListColumnName",
    listItem.ParentList.ParentWeb.EnsureUser(peopleeditorId.CommaSeparatedAccounts));
    Can anybody help me out to resolve the issue?
    Thank you in advance!!!
    AA.

    First get all the users/groups from the PeapleEditor by using PeapleEditor.ResolvedEntities
    foreach (PickerEntity pickerEntity in peopleEditor.ResolvedEntities)
    SPPrincipalType principalType = (SPPrincipalType)Enum.Parse(typeof(SPPrincipalType), pickerEntity.EntityData["PrincipalType"].ToString());
    if (principalType == SPPrincipalType.User || principalType == SPPrincipalType.SecurityGroup)
    string loginName = pickerEntity.Key;
    //your code here
    else if (principalType == SPPrincipalType.SharePointGroup)
    string groupName = pickerEntity.Key;
    //your code here
    Add all the users/groups in an instance of SPFieldUserValueCollection
    and then update your list item.
    SPFieldUserValueCollection users = new SPFieldUserValueCollection();
    users.Add(new SPFieldUserValue(web,user.ID,user.Name));
    item["YourUserColumn"] = users;
    item.Update();

  • SortcompareFunction is not working properly for more than 1 column in advanced datagrid

    Hi Guys,
    I am using an advanced datagrid with groupingCollection.
    I have more than 1 grouped column. How ever I am using 2 sort compare function to sort date and time.
    The problem is when I am trying to sort date its workinf properly then when I jump to time column its not working and sorting few rows only inside the  column but not the entire column. samething happen when I sort time first and the date is not sorting.
    any help will be really appriciable .
    Thanks in advance.

    In our application we tend to use views to return appropriate values for a particular user.
    For example (we do building inspections) the publication item sql is like
    select * from inspection_sites where id in (select site_id from v_pda_bi_sites where bi_id=:bi_id)
    The view acts like a dynamic parameter table (in this cases looks at experience level, status of sites, and responsibility allocations). Once the driving views are tuned this works quite efficiently, and as the dependant tables for the publication item automatically includes all of the tables in the driving view, the object gets refreshed if there is any change to any of them, even if the site details themselves have not changed

  • Grouping issue on Advanced DataGrid

    Hello,
    I've got an advanced datagrid with 5 columns, The number_Group column has data like this...
    1-10
    1-10
    11-20
    11-20
    11-20
    21-30
    21-30
    21-30
    41-50
    101-110
    When I apply Grouping, it works as expected but the 101-110 group is displayed before the 11-20 group.
    I've tried to set groupingField.numeric = true but that screws it up even more... because 11-20 isn't a number I'm guessing.
    Does anyone know a way around this? I could change the number_Group column to this...
    1
    1
    11
    11
    21
    41
    101
    and groupingField.numeric = true should work but I need the Grouping display to show 1-10, 11-20. Perhaps I can intercept this and modify it?
    Anyone got any ideas?
    Thanks,
    Nick

    Hi, Nicky
    u can solve this problem by grouping function.
    u create ur dataprovider like
    private var myData:ArrayCollection = new  ArrayCollection([{data1:1, data2:10,......},
                                                                                         {data1:1, data2:21, ....}]);
    u declare the grouping function in following manner
    private function myGroupLabelFunction(item:Object, column:AdvancedDataGridColumn):String
    // here u write ur logice to formatting ur dispalying data in advance grid.
    //suppose ur labelfield of datagrid are data1,data2, data3 respectively.
    return item.data1+"-"+item.data2;
    if u do in this way i think it will work.
    if u sucess then give me mark.
    Thanks
    Niranjan

  • Filtering of Grouped data in Advanced DataGrid

    I want to display the Hierarchical Data (groped data) in
    Advance DataGrid and at the same time I want the filtering
    functionality as well. The problem is if I want grouped view then I
    have to provide GroupingCollection to the dataprovider ( that has
    no filterFunction type functionality ).
    Is there any way to solve this issue?

    You have to call adg.validateNow() after assigning the
    GroupingCollection as dataProvider to the AdvancedDataGrid and
    before applying the filterFunction.
    It should be like -
    adg.dataProvider = gc;
    adg.validateNow();
    IHierarchicalCollectionView(adg.dataProvider).filterFunction
    = filterFunc;
    IHierarchicalCollectionView(adg.dataProvider).refresh();
    Note: The filter function will be applied to group rows
    also.

  • How to generate a report group by column value

    I have a table with five columns:
    c1, c2, c3, c4, count.
    I want to generate a report like this
    Total
    c1, c2
    c3, c4
    such as the values inside the table are:
    a1 b1 cc dd 2
    a1 b1 ee ff 3
    a1 b1 gg hh 4
    a1 b2 jj kk 3
    a1 b2 ll mm 4
    a1 b2 nn oo 2
    a3 b3 pp qq 3
    a3 b3 rr ss 4
    the report will be like:
    a1-b1
      cc-dd 2
      ee-ff 3
      gg-hh 4
    Total for a1-b1 9
    a1-b2
      jj-kk 3
      ll-mm 4
      nn-oo 2
    Total for a1-b2 9
    a3-b3
      pp-qq 3
      rr-ss 4
    Total for a3-b3 7
    What is the best way to achieve this?
    Thanks.
    Jen

    Hi Jen,
    Personnaly I would use a PL/SQL region and use MOD_PLSQL (htp.p) to create such a special layout, but then again you should know how to do it.
    Another way would be to create a select statement in which you select the lines you want:
    select c1||'-'||c2 key1, 0 key2, 'category '||c1||'-'||c2 , null count from table
    union
    select c1||'-'||c2, rownum, rpad(' ',5)||c3||'-'||c4, count from table
    union
    select c1||'-'||c2, count(*)+1, 'Total for cat. '||c1||'-'||c2 , sum(count)
    from table group by c1||'-'||c2, 'Total for cat. '||c1||'-'||c2
    union
    select c1||'-'||c2, count(*)+2, ' ',null from table group by c1||'-'||c2 /* empty line */
    order by 1, 2
    You can base a normal report on this.
    good luck,
    Dik

  • Web Dynpro ABAP: How to do checkboxes in table column?

    Hi,
    In Web Dynpro for ABAP, I have a table, where one column consists of check boxes, and the user should be able to check some boxes in some lines. In the context of my view, I created a node tied to a DDIC structure, with some attributes. The attribute where I want to see the checkboxes is of type boolean. In the layout I create an element of type table. Then I create the binding to the context node and for the columns I use cell editor of the appropriate type, that is, checkbox. However, when I test my application, there are no checkboxes at all. What am I doing wrong?
    Thanks,
    Ira

    >
    Jenny Karunakaran wrote:
    > Hi Jung,
    >
    > Thanks for the reply. But I dont know how to assign value set to this attribute(i.e. Context atribute to which filter value property is bound). Can I use a supply function for this ?
    >
    >
    > Regards,
    > Jenny
    No. A value set and a supply function are two completely different things. You use this Context API to populate the value set for an attribute:
    IF_WD_CONTEXT_NODE_INFO=>SET_ATTRIBUTE_VALUE_SET
    Value Sets are also how ByKey UI elements (like the DropDownByKey) are built.  Here is a help document that discusses value sets - but in the context of the ByKey UI elements.  The process is the same for creating the value set however:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bb/69b441b0133531e10000000a155106/frameset.htm

  • How to use checkboxes instead of radio button in datagrid

    I have a datagrid. I have two checkboxes in datagrid.That checkboxes should act like radio button.ie we can select only one checkbox at a time. If we select second checkbox,then the first selected checkbox should deselected.How to handle this scenario.Please give some code samples.
    Thanks & Regards
    kvpdy

    You could do that, but it will be a lot easier doing it from the data model. This way you don't have to modify the behavior of the chart, it just blindly renders the data given to it. Behind the scenes you're dealing with boolean values, so it's pretty easy to write setters accomplish this.
    public function set myAttribute(value:Boolean):void
         setAttributesTiedTogetherToFalse();
         _attrib = value;

  • How to remove Sorting of the columns from Advance TAB

    Hello Experts,
    I have a simple question -
    Have a report which produces results from values selected from prompt. The data in report is correct, however the ffirst 2 columns in the Report are being grouped by. So when a user downloads the Report in EXCEL, they see that the fiirst 2 columns are not populated in all the cells of the Excel and they have to populated them manually.
    I have tried to remove the sort order in the Advance SQL tab, but without any luck. I have tried to rearrange the columns of the reports as well, but no luck as well
    Any quick fix for this behaviour ?
    Regards
    Sam

    Your subject shouldn't be that.. ;), if you are looking for repeating values for all the cells for that particular column
    go to first 2 column properties > Column Format .
    In "Value suppression" section, you'll find repeat option radio button. check that and click ok. Now test your report

  • How to avoid that the last column in a datagrid increase the width out of the window?

    I have a datagrid with this configuraction:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}"/>
    </DataGrid.Columns>
    The last column is a description, so the text can be a bit large. so I would like that the width don't be wnough greater than makes the datagrid has a width out side the window.
    For this, I have read that I can use Width="Auto" in all the columns and in the last column width="*", but in this case all the coloumns has a very low width so I can't read anything.
    The code that I have used in this case is:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width=""Auto"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width=""Auto"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    I am using visual studio community edition and wpf 4.5.1.
    Thank so much,

    >>For this, I have read that I can use Width="Auto" in all the columns and in the last column width="*", but in this case all the coloumns has a very low width so I can't read anything.
    Can't you just set an explicit width for the first two columns then?, e.g.:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    There is also a MinWidth property that you can use to prevent the columns from being to narrow:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • How to generate a crash (or bug) report

    I am trying to work with Soho notes (documents management: scanning, archieving, ....). I have a problem while using one functionality of this software: the mouse pointer becomes the spinning wheel with all the colors. After I have waited more than 5 mns like this I have to force Soho Notes to quit. The customer support for Soho asked me to send a crash report in order to help fixing the issue. Can somebody help on how to generate such report. Thanks in advance.
    Message was edited by: Pierre-Antonin

    The Crash Log can be found ar
    Home / Library / Logs / Crash-Reporter / APP NAME.crash.log
    Double click on the file and it will open in the Console. Copy and Paste it into an email
    Regards
    TD

  • How to generate serial number in group by sql

    I need the query output with record serial number by a group,
    Sr No by dept Dept Id Emp Name
    ========= ===== =======
    1 10 aaaaa
    1 11 abndddd
    2 11 sdfffffff
    3 11 s sdfe
    4 11 ggg
    1 12 dDEWQ
    1 13 xccc
    2 13 DSAFG
    How to generate the first column in the above output using sql?
    Thanks in advance
    Shrinivas

    use the analytic function ROW_NUMBER
    here is a small example
    SQL> select row_number() over(partition by deptno order by empno) rno, deptno, empno
      2    from emp
      3  /
           RNO     DEPTNO      EMPNO
             1         10       7782
             2         10       7839
             3         10       7934
             1         20       7566
             2         20       7788
             3         20       7876
             4         20       7902
             1         30       7499
             2         30       7521
             3         30       7654
             4         30       7698
           RNO     DEPTNO      EMPNO
             5         30       7844
             6         30       7900
    13 rows selected.

  • How to generate report with dynamic variable number of columns?

    How to generate report with dynamic variable number of columns?
    I need to generate a report with varying column names (state names) as follows:
    SELECT AK, AL, AR,... FROM States ;
    I get these column names from the result of another query.
    In order to clarify my question, Please consider following table:
    CREATE TABLE TIME_PERIODS (
    PERIOD     VARCHAR2 (50) PRIMARY KEY
    CREATE TABLE STATE_INCOME (
         NAME     VARCHAR2 (2),
         PERIOD     VARCHAR2 (50)     REFERENCES TIME_PERIODS (PERIOD) ,
         INCOME     NUMBER (12, 2)
    I like to generate a report as follows:
    AK CA DE FL ...
    PERIOD1 1222.23 2423.20 232.33 345.21
    PERIOD2
    PERIOD3
    Total 433242.23 56744.34 8872.21 2324.23 ...
    The TIME_PERIODS.Period and State.Name could change dynamically.
    So I can't specify the state name in Select query like
    SELECT AK, AL, AR,... FROM
    What is the best way to generate this report?

    SQL> -- test tables and test data:
    SQL> CREATE TABLE states
      2    (state VARCHAR2 (2))
      3  /
    Table created.
    SQL> INSERT INTO states
      2  VALUES ('AK')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AL')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AR')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('CA')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('DE')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('FL')
      3  /
    1 row created.
    SQL> CREATE TABLE TIME_PERIODS
      2    (PERIOD VARCHAR2 (50) PRIMARY KEY)
      3  /
    Table created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD1')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD2')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD3')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD4')
      3  /
    1 row created.
    SQL> CREATE TABLE STATE_INCOME
      2    (NAME   VARCHAR2 (2),
      3       PERIOD VARCHAR2 (50) REFERENCES TIME_PERIODS (PERIOD),
      4       INCOME NUMBER (12, 2))
      5  /
    Table created.
    SQL> INSERT INTO state_income
      2  VALUES ('AK', 'PERIOD1', 1222.23)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('CA', 'PERIOD1', 2423.20)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('DE', 'PERIOD1', 232.33)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('FL', 'PERIOD1', 345.21)
      3  /
    1 row created.
    SQL> -- the basic query:
    SQL> SELECT   SUBSTR (time_periods.period, 1, 10) period,
      2             SUM (DECODE (name, 'AK', income)) "AK",
      3             SUM (DECODE (name, 'CA', income)) "CA",
      4             SUM (DECODE (name, 'DE', income)) "DE",
      5             SUM (DECODE (name, 'FL', income)) "FL"
      6  FROM     state_income, time_periods
      7  WHERE    time_periods.period = state_income.period (+)
      8  AND      time_periods.period IN ('PERIOD1','PERIOD2','PERIOD3')
      9  GROUP BY ROLLUP (time_periods.period)
    10  /
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> -- package that dynamically executes the query
    SQL> -- given variable numbers and values
    SQL> -- of states and periods:
    SQL> CREATE OR REPLACE PACKAGE package_name
      2  AS
      3    TYPE cursor_type IS REF CURSOR;
      4    PROCEDURE procedure_name
      5        (p_periods   IN     VARCHAR2,
      6         p_states    IN     VARCHAR2,
      7         cursor_name IN OUT cursor_type);
      8  END package_name;
      9  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY package_name
      2  AS
      3    PROCEDURE procedure_name
      4        (p_periods   IN     VARCHAR2,
      5         p_states    IN     VARCHAR2,
      6         cursor_name IN OUT cursor_type)
      7    IS
      8        v_periods          VARCHAR2 (1000);
      9        v_sql               VARCHAR2 (4000);
    10        v_states          VARCHAR2 (1000) := p_states;
    11    BEGIN
    12        v_periods := REPLACE (p_periods, ',', ''',''');
    13        v_sql := 'SELECT SUBSTR(time_periods.period,1,10) period';
    14        WHILE LENGTH (v_states) > 1
    15        LOOP
    16          v_sql := v_sql
    17          || ',SUM(DECODE(name,'''
    18          || SUBSTR (v_states,1,2) || ''',income)) "' || SUBSTR (v_states,1,2)
    19          || '"';
    20          v_states := LTRIM (SUBSTR (v_states, 3), ',');
    21        END LOOP;
    22        v_sql := v_sql
    23        || 'FROM     state_income, time_periods
    24            WHERE    time_periods.period = state_income.period (+)
    25            AND      time_periods.period IN (''' || v_periods || ''')
    26            GROUP BY ROLLUP (time_periods.period)';
    27        OPEN cursor_name FOR v_sql;
    28    END procedure_name;
    29  END package_name;
    30  /
    Package body created.
    SQL> -- sample executions from SQL:
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2,PERIOD3','AK,CA,DE,FL', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2','AK,AL,AR', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR                                                        
    PERIOD1       1222.23                                                                              
    PERIOD2                                                                                            
                  1222.23                                                                              
    SQL> -- sample execution from PL/SQL block
    SQL> -- using parameters derived from processing
    SQL> -- cursors containing results of other queries:
    SQL> DECLARE
      2    CURSOR c_period
      3    IS
      4    SELECT period
      5    FROM   time_periods;
      6    v_periods   VARCHAR2 (1000);
      7    v_delimiter VARCHAR2 (1) := NULL;
      8    CURSOR c_states
      9    IS
    10    SELECT state
    11    FROM   states;
    12    v_states    VARCHAR2 (1000);
    13  BEGIN
    14    FOR r_period IN c_period
    15    LOOP
    16        v_periods := v_periods || v_delimiter || r_period.period;
    17        v_delimiter := ',';
    18    END LOOP;
    19    v_delimiter := NULL;
    20    FOR r_states IN c_states
    21    LOOP
    22        v_states := v_states || v_delimiter || r_states.state;
    23        v_delimiter := ',';
    24    END LOOP;
    25    package_name.procedure_name (v_periods, v_states, :g_ref);
    26  END;
    27  /
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR         CA         DE         FL                       
    PERIOD1       1222.23                           2423.2     232.33     345.21                       
    PERIOD2                                                                                            
    PERIOD3                                                                                            
    PERIOD4                                                                                            
                  1222.23                           2423.2     232.33     345.21                       

Maybe you are looking for