Run Report from PL/SQL with branch to different page

I have an application in which, at various points, I run a PL/SQL procedure to perform an action, and then need to run a report while also navigating away from the current page. The actions are executed on a button click.
I have tried various method, but for the life of me cannot get the system to do both things (ie. run the report and branch to another page). I have tried putting in a branch to page 0 (to execute after processing on the button click), with a request line to print the report, followed by a branch to the other page (also to execute after processing on the button click) - and only the branch to page 0 actually executes. Also tried putting a branch to the other page only, with the print request in the Request parameter - but only runs the report, does not branch to the other page.
I have also tried to put the call to run the report into the PL/SQL code, using utl_http.start_request(url), but that came up with a "Bad Request" error. Also tried using the owa_util.redirect_url call, but also no luck.
I am pulling my hair out at the moment, mainly because I am under pressure to deliver the system in very short time.
Any suggestions would be appreciated.

You can run Report queries from their URL ( f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=<REPORT NAME>)
So an approach would be to
On Button click, call a JS function that
<li>1. uses Ondemand/Callback process to do the workflow processing(check box selection records)
<li>2. opens the Report as a popup window(from your IR page)
<li>3. Redirect away from the IR page to another page?
Another approach:
<li>1. IR report submits the page
<li>2. In the PLSQL block you do the processing
<li>3. The branch redirects to a URL which would point to the Report URL.
OR
<li>3. Have an onload JS which runs only when the request was the BUTTON request and that opens up a page which points to the report.
Yet another way would be to use htp.p within the PLSQL block that does the workflow processing
So your PLSQL code would be
BEGIN
  --Do the workflow processing here
  --End workflow processing
  htp.p('<script>');
  htp.p(' window.open("f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=<REPORT NAME>"'); --opens up the PDF report
  htp.p(' window.location.href= "f?p=&APP_ID.:<page number>:&SESSION."');  --to redirect to new page
  htp.p('</script>');
END;

Similar Messages

  • Run reports from pl/sql

    Hello, i want to run reports from pl/sql, how can i do it, i suppose i can use
    RWRUN60 with the appropiate parameters, but i don4t know how to execute RWRUN60 from pl/sql.
    Thanks in advance.

    Hi,
    I believe by mistake you posted the same question twice. See my response in the other one.
    Thanks,
    Rohit

  • Run report from PL/sql procedure

    Please any one tell how to I run a report from pl/sql procedure.

    I am not sure, but depending on your environment you can create a script to run your PL/SQL code and then generate the report. As is customary in an UNIX environment utilizing shell scripts.

  • Running report from command line with multiple value for same parameter

    Hey,
    I know how to run a report from the command line specifying parameters values each time but I was wondering if someone could tell me how I would go about running the same report multiple times in a batch program but specifying a list of values to pass to a parameter each time.
    So for example if a parameter was 'School Number', how could I run a report in a batch program that would pass a school number to the report as a parameter using a list of school numbers generated for a sql statement or something. So if I had 300 school numbers in my list then I would get 300 different reports when the batch program finished.
    This leads me to another question. How can I dynamically change the name of the report generated by the batch to use the school number value passed in, so for example if the value 3 was passed in the name would be something like School 3.pdf, if 4 was passed in the name would be School 4.pdf....etc
    Any help on this?
    Thanks

    Hello,
    Bursting and Distribution may help you ....
    37 Bursting and Distributing a Report
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_dist.htm
    Regards

  • Running report from forms 10g with parameters

    db and dev 10g ,
    hi all , my report displays "sal and ename" columns of scott/tiger schema .
    i've seen a lot of articles talking about this but i want you to help me to get it :
    1- i want to run report by assigning a value to the "report other" property of the report object .
    i've tried it like so , i wrote sal = 800 or ename = 'SCOTT' in that property "report other" . and it did not work .
    2- and i want to how to do the same with "set_report_object('myrep',report_other,..........) ;
    3- i did it before with a parameter list by creating a parameter in the report builder called "p_sal" and p_ename then
    created a parameter list with :sal and :ename text_items as parameters then added the parameter list to
    run_report_object('myreport',pl) and it did not work too .
    please clarify these to me
    thanks a lot

    newbi_egy wrote:
    SET_REPORT_OBJECT_PROPERTY(ro,REPORT_OTHER, 'p_deptno='||:dept.deptno||'paramform=no');
         v := run_report_object(ro) ;
         web.show_document('http://rocky:8889/reports/rwservlet/getjobid'||substr(v,instr(v,'_')+1)||'?server=rocky','_blank') ;
         end ;
    when i press the button , FRM-41214 shows up in the form , and REP-52251 ,and i still can not run it .
    do i miss something ?
    by the way , when i typed this in the address bar :
    http://rocky:8889/reports/rwservlet/showjobs?server=rocky , then clicked "x" button , then
    i got this
    <br>REP-300: invalid number where deptno = : ==> p_deptno finished with error
    thanks
    Hi,
    You can not check the second link i provided where parameter passing issue is clearly mentioned. you should give space before all parameter.
    Check the second link, it will help you. And for your correction
    SET_REPORT_OBJECT_PROPERTY(ro,REPORT_OTHER, 'paramform=no p_deptno='||:dept.deptno);Hope you understand...
    Hamid

  • Running form from Forms Builder with IE

    Forms 11.1.1.4, IE 8, Windows 7 64-bit.
    1. Running form from Forms Builder with IE results in Page cannot be displayed. My Java console doesn't even appear so it's not getting to the servlet part.
    2. Running same form stand-alone in IE works fine. The URLs are identical (I've cut/pasted them)
    3. Running same form from Forms Builder with Firefox works fine. The only change I made was to the runtime preference for the browser location.
    Seems like this has to be something to do with the browser configuration that only occurs from Forms Builder. What could it be?

    I'm not sure about the specifics of your configuration but I suspect the answer is in formsweb.cfg (and the associated .env file).
    I think that generally the configuration that runs for formbuilder is the "default" whereas you could be specifying a different
    one on the url not going through formbuilder. (but if you're using em then it's really hard to know what's going on since it seems
    to not write changes back to the config and env files until it is stopped. This caused me many days of confusion until I figured it out and
    that's why I would highly advise never using it to modify .config or env settings.)
    check what jre is installed in ie (tools, manage addons, there is on my machine:
    java 2 plugin ssv helper and JQSIEStartDetectorImpl browser helper object.
    Not sure which one or both is necessary.
    Have your url be a trusted site, unblock it from popup blockage, and most of all stare at your formsweb.cfg default section. It would help
    if you specified what was in the url. do you have config=X in there?
    Edited by: lake on Jul 23, 2011 12:21 PM

  • Run multiple reports from PL/SQL

    I am planning to run reports from a PL/SQL batch program. My requirement is i need to generate multiple(around 50) reports with only a difference in one numeric parameter which will go from 1 to 50. I am planning to invoke the report inside a loop which goes from 1..50. I heard that i need to use a utl_http package which i havent used till now. Does somone has a sample code for running a report from pl/sql. i need it ASAP. Thanks in advance

    hi rejesh,
    we have an pl/sql API in reports to do exactly what you want to do.
    The Reports Event Driven Publishing API
    find the documentation including examples in the reports getting
    started on technet.
    http://otn.oracle.com/products/reports/htdocs/getstart/docs/a92102_01.pdf
    Chapter 11
    regards,
    christian

  • Running report from a button in forms 6 with parameter

    im new to reports 6 please give me the code for running report from a button in forms 6 with parameter
    regards

    Hi ,
    Use this SRW.RUN_REPORT..
    Go thru the help in Reports by typying
    Running a report from Form Builder or Graphics Builder
    go thru the instuctions and examples.
    --Basava.S                                                                                                                                                                                                                                                                                                                                                                           

  • Invoking XML Publisher Report from PL/SQL

    Hi,
    I have a PL/SQL procecedure which invokes the Concurrent Request for the XML Publisher Report. This one finishes with a warning and I get 'Unable to publish output' when I try to view the output. Exact Error: "Unable to find the published output for this request "
    But if I run the same report using Concurrent program, the Report executes with no error. Also the desired output is coming. I am not sure where I am doing wrong in code.
    My code which invokes the XML Publisher Report (from PL/SQL package)is something like this:
    declare
    x boolean;
    l_no_of_copies varchar2(45);
    l_printername varchar2(45);
    l_print_style varchar2(45);
    l_result boolean;
    y number;
    begin
    x := fnd_request.add_layout (template_appl_name => 'XXTMG', template_code => 'XXT_5001_BOL_T', template_language => 'EN', template_territory => 'US', output_format => 'XML');
    l_no_of_copies := fnd_profile.VALUE ('XXTMG_SH_BOL_REPORT_NO_OF_COPIES');
    l_printername := fnd_profile.VALUE ('XXTMG_SH_BOL_REPORT_PRINTER');
    l_print_style := NULL; --For setting the Printer Options
    l_result := fnd_request.set_print_options (l_printername, l_print_style, l_no_of_copies, TRUE, 'N');
    l_result := fnd_request.add_printer (l_printername, 0);
    y := fnd_request.submit_request ('XXTMG', 'XXT_5001_BOL', '', TO_CHAR (SYSDATE, 'YYYY/MM/DD HH24:MI:SS'), FALSE, 'CH-120079') ;
    end;
    Please let me know where I might be going wrong
    Thanks

    Hi Sumit,
    You can try with this code:
    exec dbms_application_info.set_client_info(org_id)
    exec fnd_global.APPS_INITIALIZE(user_id,resp_id,appl_id);
    declare
    x boolean;
    l_no_of_copies varchar2(45);
    l_printername varchar2(45);
    l_print_style varchar2(45);
    l_result boolean;
    y number;
    begin
    x := fnd_request.add_layout ('XXTMG' --template_appl_name 
              ,'XXT_5001_BOL_T' --template_code
              ,'en' --template_language 
         ,'US' --template_territory
         ,'XML' --output_format
    if (x=TRUE) then
    y := fnd_request.submit_request (
                        'XXTMG'           --application 
                        ,'XXT_5001_BOL'      --program
                        ,SYSDATE          --start_time
                        ,FALSE               --sub_request
                        ,'CH-120079'          --argument1 (Program's Parameter)
    if y>0 then
              dbms_output.put_line('Request ID '||y);
    end if;
    end if; --if (x=TRUE) then
    end;
    Make sure that program has only one input parameter. If program has other parameters then you can pass those parameters like argument1, argument2... etc.
    Now you can see this submited request in your application using your user id. If you able to see your request in concurrent request then you can add printer parameters in this programs.
    You don't need to pass all 100 parameters.
    I am executing many programs/reports using this code.
    Thanks
    Ravi
    [email protected]
    Message was edited by:
    Ravi Tripathi

  • Generating reports from PL/SQL

    I'm new to the world of BI Publisher - so far I'm impressed with what I've seen. I've managed to create a report and an RTF template and generate some nice looking PDF's :)
    What I need to do now is to have a nightly job that produces PDF shipment reports using my template for all new shipments generated during the day and I'm having a little difficulty putting it all together.
    I've looked at the BI Publisher API's that allow me to generate an XSL from my RTF template and the using the FO engine merge the XSL and XML data to produce the PDF. Then using the delivery manager API's I can send these reports out via email.
    I'm a little unsure of how to get the XML source - I've played around with the DataEngine API to generate XML from a SQL query so I think that's where I should be heading.
    Does this all sounds right ? Ideally, I want to be able to do all of this from within a scheduled PL/SQL job every night but all the interaction with the BI server seems to be via Java.
    Is there an easy(ish) way to run all of this from within PL/SQL ?
    And should I be going about this by:
    1/ generate XML data using dataengine API
    2/ create an RTF template using word and the xml data generated above
    3/ use the RTF processor to generate an XSL-FO from my RTF template
    (1-3 will only need to be done once)
    4/ Then my nightly job will use the dataengine to generate new shipment XML data
    5/ use FO processor to generate PDF's from each
    6/ use delivery manager API's to email out
    All sounds very cumbersome and intense -is there no easier way ?! :) Also, I'm thinking i should be using the bursting engine to split one query containing all the new shipment data and generate/mail a PDF for each shipment ? Is that necessary if all going to the same email address ?
    Help/guidance/suggestions greatly appreciated !
    Many thanks,
    Brent

    repost .... Has anyone successfully called BIP web services from within the database using Java stored procedures ?
    Still struggling to work out how to generate my reports from PL/SQL ! :((

  • ERROR:SRW Packages to call report from PL/SQL.

    Hi,
    I am facing the following problem while calling a report from PL/SQL Block.
    This is my code
    SRW.Start_Debugging;
         MYPLIST :=SRW_PARAMLIST(SRW_PARAMETER('',''));
         SRW.ADD_PARAMETER(myPlist,'GATEWAY'     ,'http:..............');
         SRW.ADD_PARAMETER(myPlist,'USERID'      ,'CGIA_AUTO/AUTO_DEV@ipaddress/ORCL');
         SRW.ADD_PARAMETER(myPlist,'SERVER'      ,'rep_cgian');
         SRW.ADD_PARAMETER(myPlist,'REPORT'     ,'PGIRCGIC047.rdf');
         SRW.ADD_PARAMETER(myPlist,'DESTYPE'     ,'file');
         SRW.ADD_PARAMETER(myPlist,'DESFORMAT'     ,'pdf');
         SRW.ADD_PARAMETER(myPlist,'DESNAME'     ,'\\ipaddress\CGIA_FormPrint\WatchFolder\OTHERS\'||Z.CS_REMARKS_BL||'_'||Z.CS_CHQ_NO||'_'||M_SEQ_NO||'-'||Z.CS_FLEX_07||'-'||Z.CS_FLEX_08||'.pdf');
         SRW.ADD_PARAMETER(myPlist,'PARAMFORM'     ,'NO');
         SRW.ADD_PARAMETER(myPlist,'P_1'     ,Z.CS_BANK_CODE);
         SRW.ADD_PARAMETER(myPlist,'P_2'     ,Z.CS_BAD_ACNT_NO);
         SRW.ADD_PARAMETER(myPlist,'P_3'     ,Z.CS_CHQ_BOOK_ID);
         SRW.ADD_PARAMETER(myPlist,'P_4'     ,Z.CS_CHQ_NO);
         SRW.ADD_PARAMETER(myPlist,'P_5'     ,Z.CS_CHQ_NO);
         MYIDENT:=SRW.RUN_REPORT(MYPLIST);
    MYSTATUS := SRW.REPORT_STATUS(MYIDENT);
         SRW.STOP_DEBUGGING;
    *** Length of Paramlist : 1
    OK : Parameter added : GATEWAY=http://...
    *** Length of Paramlist : 2
    OK : Parameter added : USERID=CGIA_AUTO/AUTO_DEV@ipaddress/ORCL
    *** Length of Paramlist : 3
    OK : Parameter added : SERVER=rep_cgian
    *** Length of Paramlist : 4
    OK : Parameter added : REPORT=PGIRCGIC047.rdf
    *** Length of Paramlist : 5
    OK : Parameter added : DESTYPE=file
    *** Length of Paramlist : 6
    OK : Parameter added : DESFORMAT=pdf
    *** Length of Paramlist : 7
    OK : Parameter added :
    DESNAME=\\ipaddress\CGIA_FormPrint\WatchFolder\OTHERS\CUST000115_102024_16--.pd
    f
    *** Length of Paramlist : 8
    OK : Parameter added : PARAMFORM=NO
    *** Length of Paramlist : 9
    OK : Parameter added : P_1=SDNB
    *** Length of Paramlist : 10
    OK : Parameter added : P_2=7000674257
    *** Length of Paramlist : 11
    OK : Parameter added : P_3=7000
    *** Length of Paramlist : 12
    OK : Parameter added : P_4=102024
    *** Length of Paramlist : 13
    OK : Parameter added : P_5=102024
    Starting run_report: building url
    *** Building URL (RUN_REPORT)
    OK : URL built :
    http://ipaddress/reports/rwservlet?&USERID=CGIA_AUTO%2FAUTO_DEV%40ipaddress%2FORCL&SERVER=rep_cgian&REPORT=PGIRCGIC047.rdf&DESTYPE=file&DESFORMAT=
    pdf&DESNAME=%5C%5Cipaddress%5CCGIA_FormPrint%5CWatchFolder%5COTHERS%5CCUST00
    *** Submitting HTTP Request
    *** using URL
    :http://ipaddress/reports/rwservlet?&USERID=CGIA_AUTO%2FAUTO_DEV%ORCL&SERVER=rep_cgian&REPORT=PGIRCGIC047.rdf&DESTYPE=file&DESFORMAT
    =pdf&DESNAME=%5C%5Cipaddress%5CCGIA_FormPrint%5CWatchFolder%5COTHERS%5CCUST0001
    OK : Request submitted - Return stream : <?xml version = '1.0' encoding =
    'ISO-8859-1' standalone = 'yes'?>
    <serverQueues>
    <error code="503"
    component="REP" message="You did not specify the name of a
    report."/>
    </serverQueues>
    Here in this case even though i specify the report id in the parameter,debugger message says that 'You did not specify the name'.
    The same code is working in some other server and giving the pdf output.
    Thanks in advance for any clarification.

    Hello Chirag,
    If you want to invoke and run a report from your PL/SQL code in the database, you can do so by installing and using the SRW package supplied with Reports. This package allows you to run parametrized report jobs on a specified Reports Server from your PL/SQL program and track the job status. Please take a look at the documentation for this package in the Publishing Reports manual on OTN at: http://download-west.oracle.com/docs/html/A92102_01/toc.htm.
    On the other hand, if you just need to invoke the Reports Builder program from your PL/SQL routine, you would need to use the default builtin for calling external applications from PL/SQL.
    Thanks,
    The Oracle Reports Team.

  • Running reports from forms on the web

    On forms and reports 6i we used the following code to run reports from forms.
    We need to do the same on 9i forms and reports, we are running into problems.
    Any help will be appreciated.
    PROCEDURE web (inFileName VARCHAR2,
    inRecordGroup RECORDGROUP) IS
    outVirtualPath VARCHAR2(200) := '/forms90/f90servlet?p_url=/reports/rwservlet?'; outServer VARCHAR2(200) := 'server=rep_ora-app-4';
    outReport VARCHAR2(200) := 'report='||inFileName;
    outUserid VARCHAR2(200) :=
    'userid='||GET_APPLICATION_PROPERTY(USERNAME)||'/'||GET_APPLICATION_PROPERTY(PAS
    SWORD)||'@'||GET_APPLICATION_PROPERTY(CONNECT_STRING);
    outDesType VARCHAR2(200) := 'DESTYPE=CACHE';
    outDesFormat VARCHAR2(200) := 'DESFORMAT=PDF'; outUser VARCHAR2(2000);
    outCount INTEGER;
    error we are getting.
    FRM-42017:Module name must be specified.

    S Hatch (guest) wrote:
    : I'm thinking that you're going to have to install the Reports
    : cartridge, create an entry in the keymap with any parameters
    and
    : call your report via the url.
    : Dessislava Gantcheva (guest) wrote:
    : : How do I call a report from a form on the web?
    : : I have installed Windows NT Server 4.0 with SP 5, OAS4.0.7
    EE
    : : with patch 1, Developer 6.0 with patch 1. Developer server
    and
    : : forms server work fine in a non-cartridge implementation,
    but
    : I
    : : cannot run a report within a form. I just have no any info
    how
    : : to do this.
    I have entries in my keymap file and I can call my reports via
    the url, but I cannot run a report WITHIN a form. I mean to call
    a report by clicking on a button of a form on the web. The
    RUN_PRODUCT built-in does not work (at leas it seems like this)
    If any one has expiriense with it, please, give me a hint.
    Thanks
    null

  • How can we run reports from the front enf of iProcurement...

    Hi Guys,
    I need to create a link to run reports from the front end in iProcurement webpage instead of using apps SRS to run the report...
    help needed...
    thanks
    aman

    Hi Tapashray,
    That was a great help. Thank you so much. A few more clarifications needed sir..
    I refered to a previous link and came to know about a prcedure he followed for a report. So is it the same way that is to be done... I pasted a descr what he said in the thread. In ur solution, you said, have a link bean. what do u mean by that. After i go thru all the steps what this guy told.
    It would be of gr8 help if you kindly look in to this for one more minute sir..
    thanks
    Creating a new report in 11.5.9
    Re: Creating a new report in 11.5.9
    Posted: Mar 11, 2005 7:12 PM in response to: dhergert Reply
    Ok, I was able to figure out the functions that were confusing me. For my own record and for those that do not know, I will list how to create the objects necessary to add a new report to a menu.
    1-Write JSP (should be written just how Oracle writes theirs)
    2-Creat function for the new JSP page as System Administrator responsibility
    3-Use Sys Admin to add the function to a menu somewhere
    4-Using AK Developer responsibility, create an attribute with the label of the attribute being the name of your function you created. Oracle's convention is the name of the attribute has FS in it.
    5-Using AK Developer, lookup the ASF_FUNC_SEC_REG region
    6-Drill down into that regions attributes
    7-Add a your newly created attribute to this region

  • Running report from forms

    hi,
    I am having problems in running report from form.
    I am using oracle 9i on windows 2000 server and no 9iAS at the moment. On client side, i have windows xp and 9iDS installed. I want to run report from forms in 9iDS testing environment.
    my forms are running ok but now i need to run report. so what i have done is that i have created a report object in form and following are enteries present in it at the moment.
    Name REPORT7
    FileName D:\Projects\IBMR\forms\soil_water_quality_data.rdf
    Execution Mode Batch
    Communication Mode Synchronous
    Destination Type Cache
    Report Server 9irep
    and in when_button_pressed trigger
    DECLARE
    Report_Id REPORT_OBJECT;
    Report_Job_Id VARCHAR2(20);
    Report_Status VARCHAR2(80);
    Report_Svr VARCHAR2(20);
    BEGIN
    Report_Id := FIND_REPORT_OBJECT('REPORT7');
    Report_Svr := '9irep';
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_EXECUTION_MODE, BATCH);
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_FILENAME, '\projects\ibmr\forms\soil_water_quality_data.rdf');
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_COMM_MODE, SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_DESFORMAT,'PDF');
    SET_REPORT_OBJECT_PROPERTY(Report_Id,REPORT_OTHER, 'paramform=no');
    Report_Job_Id := RUN_REPORT_OBJECT(Report_Id);
    Report_Status := REPORT_OBJECT_STATUS(Report_Job_Id);
    WHILE Report_Status IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
    Report_Status := REPORT_OBJECT_STATUS(Report_Job_Id);
    END LOOP;
    IF Report_Status = 'FINISHED' then
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(Report_job_id,instr(Report_Job_Id,'_',-1)+1)||'?'||'server=9irep','_blank');
    else
         message ('report server failed with error message '||report_status);
    END IF;
    END;
    i have installed report server with following command
    rwserver -install 9irep
    i have changed entry in rwservlet.properties like
    SINGLESIGNON=NO and i have removed the following entire block of 9irep.conf, which i have read from some documentation
    <!--security id="rwSec" class="oracle.reports.server.RWSecurity">
    <property name="securityUserid" value="%PORTAL_DB_USERNAME%/%PORTAL_DB_PASSWORD%@%PORTAL_DB_TNSNAME%" confidential="yes" encrypted="no"/>
    </security-->
    i get the following error message when i run my form
    frm-41214 Unable to run report
    and then next message is
    frm-41217 unable to get report job status
    i debugged the report id and it is
    9irep_0
    returned by Report_Job_Id := RUN_REPORT_OBJECT(Report_Id);
    When I checked the Report Queue Manager
    it is showing status like
    (9irep)Terminated with error
    and detail it shows is
    Unable to connect to the specified database.
    Now I am wondering what to do next.
    any suggestions???????

    Hello,
    From your description, it seems like the report is faling due to a database authentication problem. When you run your report from Forms, Forms internally passes the its database connection information to Reports automatically. So ensure that you are connected to a valid database in Forms, before the report is called.
    Please verify whether a simple report which does not require a database connection, for example, a report containing only a boilerplate text object, is running correctly. Also, in the trigger code that you have specified, you should add the following:
    SET_REPORT_OBJECT_PROPERTY(Report_Id, REPORT_DESTYPE, CACHE);
    so that the report output gets generated to the server cache, and can be retrieved using rwservlet/getjobid.
    Thanks,
    The Oracle Reports Team.

  • Run Report from Oracle Forms9i

    Hi how are u all.......i am shahzad and i have little problem....i am working on developer 6i with oracle 9i database..........now i upgrade into developer 9i.....now the problem is that when i call the report from form then error is generated that is like'you cannot use reun run_product here use run_report_object'
    Any one plz tell me how to run report from forms 9i also how to pass parameter too...means check the parameter from forms and give me the reports
    guys its urgent
    Thanks in advance :)
    Thanks you

    fot this u have to use standard code as follows
    parameter list is as it was in 6i
    v_report_id := FIND_REPORT_OBJECT('report name');
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE, SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,file);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT,'dflt');
    Set_Report_Object_Property(v_report_id,REPORT_OTHER,'ENVID="NFA"');
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESNAME,ls_file_path||'\'||to_char(sysdate,'dd')||
         --     to_char(sysdate,'mm')||to_char(sysdate,'yyyy')||'.doc');
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_EXECUTION_MODE,RUNTIME);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER, 'paramform=no');
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER,reportserver);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESNAME,OUTFILE);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER, reportserver);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER, 'paramform=no');
    vc_report_job_id:=RUN_REPORT_OBJECT(v_report_id,pl_id);
    v_jobID := substr(vc_report_job_id,length(reportserver)+2,length(vc_report_job_id));
    if      vc_report_job_id is not null then
    vc_rep_status := REPORT_OBJECT_STATUS(vc_report_job_id);
    while vc_rep_status in ('RUNNING', 'OPENING_REPORT','ENQUEUED') LOOP
    vc_rep_status := report_object_status(     vc_report_job_id);
    end loop;          
    IF vc_rep_status<>'FINISHED' THEN
         message ('Report failed with error message '|| vc_rep_status);
              END IF;
         end if;

Maybe you are looking for