How to schedule a report with dynamic parameters

We need to schedule a Webi report with dynamic parameters then email the different result to different email groups.  Is it possible to do this in scheduler? Please advise. Thanks.

there are 2 schedulers
1st  CMS
the reports which does not have any input parameters, only then t can be scheduled in CMS
2nd in Infoview
if report has input parameters and if you want to schedule it, then you may need to schedule the report from Infoview
To have a email notification
configure the SMTP server in report JOB Server
Thanks,
Ganesh

Similar Messages

  • I'm getting the below issue when I try to deploy a report with Dynamic parameters, when I deploy it with static parameters I'm not getting this issue.

    I’m getting the below issue when I try to deploy a crystal report with Dynamic parameters in BI Launch Pad, when I deploy the same report with static parameters I can deploy and run it. I have Restarted the BI server, still the issue exitno use. kindly help me on this issue.
    “This error occurred: Adding Crystal Report "CrystalReport1.rpt" failed. The server with kind rptappserver returned an error result. Failed to copy the report file to the report object. Refreshing the report object properties might have failed. Failed to read data from report file CrystalReport1. Reason: Failed to read parameter object”.

    BO does not run dynamic params through the report as would happen without BusinessObjects (BO) or Crystal Reports Server (CRS).  When you publish a report with dynamic parameters to BO/CRS, the prompt is published to the repository so that it can be accessed through the Business View Manager (which can be installed as part of the client tools).  In order for this to work a couple of things need to happen:
    1.  You need to be sure that you check the "Update Repository" box on the Save As screen the first time you publish the report.
    2.  Your BO/CRS user needs to have "view" access to the Crystal2013ReportApplicationServer in the Servers section in the CMC - in fact, the Everyone group should be given view access to the server in order for dynamic prompts to work correctly.
    3.  In the Business View Manager, the Administrator user needs to give your user, or, even better, a Crystal Developers group full control access to the "Dynamic Cascading Prompts" folder.
    Best practice for dynamic prompts in a BO/CRS environment is to actually create the prompts in the Business View Manager.  This will allow you to create a single data connection that can be reused and also create lists of values such that the same list or prompt can be reused by multiple reports.  If you just create the prompts in Crystal, you will end up with multiple data connections to the same database, the prompts will use the whole query for the reports to get the dynamic values instead of just a focused query to the lookup table that contains the values, and there ends up being lots of duplication and chaos.
    -Dell

  • Ho can I schedule a WEBI report with dynamic parameters???

    Hello again!!
    Here i am with another detail about scheduling, the thing this time is that ia need to schedule a report with one parameter every week but with a different value for the parameter every week.
    This is i need this week to run the report SALES BY STORE filtered by week with this value 2011 - 45 (yyyy - num ofweek) but the next week the value for the same parameter must be 2011 - 46
    is it possible??? i mean is possible to schedule a report with different value for the parameter each time that it runs???
    I know that i can schedule a report with different values for a parameter to send it to severals users whith different data but the values for the parameter are the same every time that it runs and i dont need that.
    Any help or clue will be very appreciated

    Hi Elio,
    Do you have access to modify your universe?
    Then you should try Dave Rathbun's idea. Here is the link:
    http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
    Note that you'll have to adapt it to what you need, in this case to the week number.
    For example if you are using Sybase syntax you'd get 2011 - 46 with:
    convert(varchar, year(getdate()))+' - '+convert(varchar, datepart(wk,getdate()))
    So you'll new object in Universe would look like :
    your_table.week = case when @prompt('Enter week','C',,mono,free) = 'This week' then convert(varchar, year(getdate()))+' - '+convert(varchar, datepart(wk,getdate()))  else @prompt('Enter week','C',,mono,free)  end
    Adapt it to the syntax of the database you use. Then after creating this object in your universe you'll have to go back to your report and Edit the query and use this object in the filter area instead of  a normal prompt.
    When you have to schedule the report leave the prompt with the parameter 'This week'
    Hope this helps
    Regards
    Erika
    Edited by: PadawanGirl on Nov 8, 2011 3:35 PM

  • Crystal Report Viewer Credential Prompt for Report with Dynamic Parameters

    The .NET Crystal Report Viewer is prompting for database credentials when launching a report containing dynamic parameters. This only occurs for reports created with SAP Crystal Reports 2011 designer. Reports created with Crystal Reports XI designer (where dynamic parameters were first introduced) work correctly.
    The credential prompt window contains the following fields:
    - Server Name: <server name> (disabled)
    - Database Name: <database name> (disabled)
    - User Name: <empty> (enabled)
    - Password: <empty> (enabled)
    - Use Single Signon Key: false (disabled)
    The values in the prompt window which are disabled are the database connection values used during the design of the report in the SAP Crystal Reports 2011 designer.
    Expected Result:
    - No prompt for database credentials.
    - Values read from the database should be populated in a drop down for the dynamic parameters.
    Environment:
    - Visual Studio 2010 (C#)
    - Windows 7 Enterprise
    - SAP Crystal Reports runtime engine for .NET Framework 4
    - SAP Crystal Reports, version for Visual Studio 2010
    - SAP Crystal Reports 2011
    The database connection is being set to use a DSN. It must be a DSN as the calling application is only aware of the DSN/Username/Password values. These values are being passed to the Crystal Report Viewer contained in a Windows form.
    The database connection for the report is being set as follows:
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection otherwise the connection does not work
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Supposed to set the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    The SetConnection method's signature is as follows:
       SetConnection(string server, string database, string name, string password)
    As you can see from the code snippet above I am setting the DSN name as the server parameter, blank for the database parameter (a database connection using DSN should only require DSN name/Username/Password) and the database username and password respectively.
    Is this a SAP bug?
    Is this the correct way of setting the database connection to use a DSN?
    Is there some other properties that need to be set somewhere else in the report through code?
    Any help would be greatly appreciated.

    Thanks for the pointer to the database connection code generator. After taking a look at the output from the tool I was able to finally get the dynamic parameters to load and populate properly without prompting for credentials. I needed to tweak the outputted code a bit to match my requirements of using a DSN only connection.
    Instead of updating the database connection properties contained within the Report.Database.Tables collection from the CrystalReports.Engine namespace, I changed it to replace the database connection properties in the Report.ReportClientDocument.DatabaseController.Database.Tables collection from the CrystalDecisions.ReportAppServer.DataDefModel namespace. For one reason or another, using the RAS namespace solved the problem.
    Below is the updated code with the change made:
    using RAPTable = CrystalDecisions.ReportAppServer.DataDefModel.Table;
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Sets the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    // The attributes for the QE_LogonProperties which is part of the main property bag
    PropertyBag innerPropertyBag = new PropertyBag();
    innerPropertyBag.Add("DSN", this.DSN);
    innerPropertyBag.Add("UserID", this.LoginName);
    innerPropertyBag.Add("Password", this.Password);
    innerPropertyBag.Add("UseDSNProperties", "true");
    // The attributes collection of the tables ConnectionInfo object
    PropertyBag mainPropertyBag = new PropertyBag();
    mainPropertyBag.Add("Database DLL", "crdb_ado.dll");
    mainPropertyBag.Add("QE_DatabaseType", "OLE DB (ADO)");
    mainPropertyBag.Add("QE_LogonProperties", innerPropertyBag);
    // Pass the database properties to a connection info object
    ConnectionInfo connectionInfo = new ConnectionInfo();
    connectionInfo.Attributes = mainPropertyBag;
    connectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
    connectionInfo.UserName = this.LoginName;
    connectionInfo.Password = this.Password;
    // Replace the database connection properties of each table in the report
    foreach (RAPTable oldTable in this.report.ReportClientDocument.DatabaseController.Database.Tables)
        RAPTable table = new RAPTable();
        table.ConnectionInfo = connectionInfo;
        table.Name = oldTable.Name;
        table.QualifiedName = oldTable.QualifiedName;
        table.Alias = oldTable.Alias;
        this.report.ReportClientDocument.DatabaseController.SetTableLocation(oldTable, table);
    this.report.VerifyDatabase();
    Thanks again Ludek for the help.

  • HOW to schedule a report with Bi Pulisher

    Hi,
    im trying to schedule a report with bip , the report already exist and it' s OK, but when i schedule it and enter the nessary input data, no output is displayed, what can I do to generate a weekly report in local folder, i don't want to add dilevery destination??
    thanks for your help

    is there anyone can help me?

  • How to create a report with dynamic columns

    Hi all,
    I am using Apex 4.0 with Oracle 10g
    I am creating a report and I need to display columns dynamically based on the item values.
    example:
    I have a table employee with columns name, designation, sal
    In the report page i have a select list with designations and when I select a designation from the select list,
    I need to display the names of the employees horizontally,
    like each name as a new column in the report with that particular designation. and same has to continue when I select different designations.
    Can some one help me how we can do that.
    I appreciate your answer
    Thanks,
    Rik

    Essentially you want to write a pl/sql function which returns a varchar2 string. The contents of the string must be a valid sql statement.
    Once you have done this, you need to add a report region as type sql report and you will have the option of writing it as a query or as a function returning query. Choose function returning query and enter in the function call.
    Note your function must be valid, and must be executable by your apex parsing schema.
    example:
    create or replace
    function test_report(   p1_tablename       in varchar2)
    return varchar2
    is
    v_query varchar2(4000);
    begin
    v_query  :=
    'SELECT * from '||p_tablename;
    return v_query;
    end test_report;Edited by: Keith Jamieson on Aug 15, 2011 4:50 PM

  • How to schedule multiple reports with different local to change static field language ?

    Hi all,
    we have requirement that we will place multiple schedule request on same server ,This schedule request will be different local setting with parameter value like: en-GB,en-US,Chinese...etc .We used translation Manager for this and it takes this parameter and change report language for static fields.
    problem is that ,on server it is not working properly,we tested for one report .if we pass prompt value to change local setting in report the we need to log off and login again in CMC to reflect new local or on BI Launchpad we need to refresh page then it shows new language.
    How we can do this with multiple scheduled report which will have different local value like en-GB,en-US,Chinese,German....?These schedule request are getting placed in server by one user .
    Please help us with sample code.
    Thanks
    Madan

    Hi,
    The only approach I can think of is to create a template report which uses variables
    For each column you would need to variable
    v_columnAName and v_columnAValue
    v_columnAName would have a if statement in it
    =if([client]="clientA" or [client]="clientC";NameOf([firstName]);if([client]="clientB";NameOf([SSN]);NameOf([lastName]));
    v_columnA would have a if statement in it
    =if([client]="clientA" or [client]="clientC";[firstName];if([client]="clientB";[SSN],[lastName]));
    This would only work when you had a small set of clients.
    This might be more managable if it was done in the universe
    Regards
    Alan

  • How to schedule Crystal reports with crystal server

    Hi,
    We are using just crystalreportsxir2 installed on the desktop, no business objects and we r not using any server
    My question is how to schedule reports with out server and I donu2019t want to use windows scheduler. Is there any way to schedule reports like this?
    If it is not possible scheduling reports in above mentioned way
    We want to buy a crystal xir2 server, in such case is it possible to schedule reports with the server we donu2019t have any portal and we dou2019t want to use any third party tools
    Pls help me in resolving this issue
    Thanks,
    Sri

    Hi Sreedhar,
    Did you find any option Scheduling for the report with in crystal designer.
    We need  Crystal Enterprise or Server to schedule the reports at regular intervals.
    We can schedule the report for our  required destination, we can view the reports with default viewers with in the Enterprise.
    There is no need of using any third party tools.
    Regards,
    Naveen.

  • How to create a report with dynamic no of columns

    Hi All,
    we have a report with 6 columns.
    and its been access by 10-20 people.
    the user dont want to have a fix report with 6 columns rather they want to have a flexibility to select the columns from the report they want to see.
    i.e. user one one time wasnt to see only one columns
    another time he want to see only column 2 and 4 of the report.
    its like there can be a multiple select option from where he can select the columns in the existing report and then see the same report with only that much column.
    Please tell me how to implement it.

    Abhip i thin you didnt get the problem.
    there is s exeiting report with 6 column
    Currently when i logging to OBIEE and see that report
    i will be getting report with 6 column
    but now i want a flexibility of selecting only 2 or 3 or 1 or 4 or 5 as i wish columns from this report and see the result only for that
    so is there by any chance i can have a check box for each column which i can check in dashborad to select that column
    and show the result were as by default it will show the report with 6 column.
    Thanks

  • Schedule Monthly Reports with Dynamic Dates, but also allow Ad-Hoc Running

    Post Author: Dan-Mica
    CA Forum: General
    I am trying to find a way to schedule a report that has an as_of_date, and a start and end date.
    When running monthly it will be scheduled to run on the 11th of each month.  The as of date will be the 10th of the month.  The start date will be the first day of the year and the end date will be the last day of the previous month.
    I have written the report using date functions to calculate the correct dates, and this can be scheduled.
    Now the users are asking to be able to run ad-hoc versions of the report and choose the dates that they use.
    What I don't know how to do is to schedule the job to run monthly as above, but also allow the users to choose the start and end dates and as of dates for the report? 
    Besides writting two versions of the reports is there another way to do this???
    Thanks for the help....

    Hi,
    U can use Infoset Query for report in HR. T-Codes are SQ03, SQ02 AND SQ01. By SQ03 create user group. then SQ02 -infoset and by SQ01 create reports.
    try this. it works.
    Regards
    Nas

  • Scheduling a Report with Dynamic Parameter Values

    Post Author: etlag
    CA Forum: Publishing
    I have created a report using a parameter that has dynamic values - meaning the user can choose a date from a specific field. It works fine once published in InfoView, but when I schedule the report, when I try to enter the parameter I get promted for a login for the database, even though I have already entered this in the CMC report properties.
    I have other reports that are using static values and they can be scheduled without entering the database login.
    Any ideas what I am missing?

    Post Author: amr_foci
    CA Forum: Publishing
    dear etlag
    its known issues, you've to set the default database connection to this report from the "CMC" web-bases appliaction , find this object click it go to "process" tab and then click the "database" tab,,, set your default database connection there and finally dont forget to set "Use same database logon as when report is run" at the end of the page
    and cilck ok
    try it ,, good luck
    Amr

  • Unable to Save Crystal Reports(With Dynamic  Parameters to Infoview)

    I am using Crystal Reports 2008 and BOXI 3.1. I have 5 dynamic parameters and can't save my report to Infoview, but If I use Static parameter then I am able to save it.
    Any help would be highly interested?
    thanks
    nisniki

    What is the exact error message and the version of crystal reports.Can you also check that all the BOE services are up and running

  • Unable to save the Crystal Report with Dynamic paramters in Enterprise

    Hello,
    We are not able to save our Crystal Report with dynamic parameters in Enterprise, Error message as follows :
    "Failed to read data from report file C:\DOCUME1\...\crw{...}.rpt. Reason : Failed to read parameter object"
    CR Developer Version 12.0.0.683
    help us in this regard..
    thanks,
    Narasimha Murty

    Hello,
    The error message occurs because the user or group who created the LOV does not have the appropriate rights in Business View Manager.
    Try this hope its helps
    To resolve this issue follow the steps,
    1.Log on to Business View Manager as administrator.
    2.Click View > Repository Explorer.
    3.Right-click Dynamic Cascading Prompts. Click Edit Rights.
    4.Click the appropriate user or group receiving the error.
    5.Click the Granted option for the right to View, Edit & Set Security rights.
    6.Click OK. Close Business View Manager.
    The user or group is now able to save a report with dynamic parameters to Enterprise.
    Regards,
    Vinay

  • How to query repository to determine Dynamic parameters used by a report

    Using BOXI 3.1 SP3
    Windows 2008
    .NET
    SQL 2008 Database
    I would like to query the repository to figure out which report is using which a dynamic parameter and then to figure out the name of that dynamic paremeter.
    The issue is the when I publish a report with Dynamic Paremeters from CR2008 to BOXI, BOXI will automatically create all the underlying connections and also rename the parameters if there is a duplicate.  I have a situation where there were over 100 +reports published and thru repository explorer in CR2008, it's impossible to tell which parameter belongs to which report.
    I would like to find in the repository the name of the dynamic parameters being used by the report.
    If I query CI_INFOOBJECTS, it does have the prompts and the original name (SI_NAME).  I don't know if it's possible thru Query Builder to query and find this result, or whether I need to write some .NET code.  The only hint in CI_INFOOBJECTS that a report has dynamic parameter is thru SI_GROUP_ID = eor://HOECRS02.NA.XOM.COM:6400/AVDGc3Df_G5Ej9HoJqO3V2g
    All dynamic parameters have SI_GROUP_ID populated.....but not sure how to use this unique value AVDGc3Df_G5Ej9HoJqO3V2g  which appears to be a SI_CUID but not sure what to query next to get more information.
    If anyone has a query built already or some code to point me in the right directiion, that would be greatly appreciated.

    The best way to determine what your wattage draw is is to purchase a killawatt meter. They are relatively inexpensive (20-30 bucks).
    http://www.amazon.com/P3-International-P4400-Electricity-Monitor/dp/B00009MDBU/r ef=pdbbs_sr1?ie=UTF8&s=hi&qid=1209640995&sr=8-1
    Glor

  • 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