Calling a report from pl/sql

Is it possible to call a report from pl/sql. I want to create a package which when invoked by dbms_jobs will create parameters and then call a report.
Thanks in advance,
Mark.

Mark,
cf: http://download-uk.oracle.com/docs/cd/B10464_05/bi.904/b13673/pbr_evnt.htm#sthref1477
Patrick.

Similar Messages

  • Can I call a report from pl/sql?

    How can I call a report from pl/sql? I would like the output to be pdf and have it outputted to the screen?
    We are running Oracle 10g database and 10.1.2.3 application server on LInux Redhat 4.
    Thanks.
    Shirley
    Edited by: jonesfnalgov on Jul 12, 2011 2:17 PM
    Edited by: jonesfnalgov on Jul 12, 2011 2:18 PM

    Hello,
    a package is provided : srwAPIins.sql installs the Event-Driven Publishing API.
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_evnt.htm
    The Event-Driven Publishing API is a PL/SQL package that provides the basic functions required for the development of procedures that respond to events in the database. Event-driven jobs are submitted using the HTTP protocol. The server assigns a unique job_ident record to every call, useful for tracking the status of the job.
    Regards

  • Calling oracle reports from pl/sql

    Helo everybody
    Can we call oracle reports(Reports 6i) from pl/sql.
    ravi

    re:How to get cookie information or http headers values inside Oracle reports

  • 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.

  • Call report from pl-sql routine

    I just got started on the report-tool, so, this might be a very basic question, but, would appreciate your
    response.
    I have a pl-sql routine registered as a concurrent program. How do I make call to report-builder from this routine.
    Thxs,

    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.

  • Execute report from pl/sql procedure

    hi all
    please, can i know whether there's any way to execute a report from pl/sql stored procedure??
    thank you.

    Hallo,
    usually you would use 21.1 The Event-Driven Publishing API
    You can search the forum for examples Google: site:forums.oracle.com call report from pl/sql
    Regards
    Marcus

  • Calling a report from another report

    Hi,
    Is there any way ,(any built in ) to call a report from another report in Report Builder 2000 and Report Builder 6i.
    Regards

    Try to call report from report by a button in the calling report:
    1     In the Layout Model view, click in the tool palette. Note
    2     Click and drag a rectangle.
    3     Double-click the button object to display the Property Palette.
    4     Under the Button Label node, set the Label Type property to either Text or Icon:
    n     If the button label is text, set the Text property to the text you want to appear on the button.
    n     If the button label is an icon, set the Icon Name property to the name of the file containing the icon (the file must reside in the directory specified by the UI_ICON environment variable).
    5     Under the Button Behavior node, set the Type property to PL/SQL.
    6     Double-click the PL/SQL Trigger property value field.
    7     In the PL/SQL Editor, define the PL/SQL for the action trigger or format trigger when the button is clicked in the formatted report.
    8     Set other properties as desired.
    9     To activate the button, run the report, then display it in the Runtime Previewer.

  • Calling a Report from another Report.....URGENT

    Hi,
    I am calling a report from another report using hyperlink. I want that this new report should come in a new page.
    Can any body help me where i can set this property, so that the new report will open in a new page.
    Thanks in advance
    Regards
    Kamal

    Try to call report from report by a button in the calling report:
    1     In the Layout Model view, click in the tool palette. Note
    2     Click and drag a rectangle.
    3     Double-click the button object to display the Property Palette.
    4     Under the Button Label node, set the Label Type property to either Text or Icon:
    n     If the button label is text, set the Text property to the text you want to appear on the button.
    n     If the button label is an icon, set the Icon Name property to the name of the file containing the icon (the file must reside in the directory specified by the UI_ICON environment variable).
    5     Under the Button Behavior node, set the Type property to PL/SQL.
    6     Double-click the PL/SQL Trigger property value field.
    7     In the PL/SQL Editor, define the PL/SQL for the action trigger or format trigger when the button is clicked in the formatted report.
    8     Set other properties as desired.
    9     To activate the button, run the report, then display it in the Runtime Previewer.

  • How can I call a Report From database function

    Hi all,
    I want to call a Report from a database function. Could you hel
    me???
    Rgds

    Hello there!
    There is a solution for executing an executable like RWRUN60
    from PL/SQL on http://asktom.oracle.com/pls/ask/f?
    p=4950:8:227101::NO::F4950_P8_DISPLAYID,F4950_P8_B:150612348067,Y
    Or you can invoke the CGI from the Reports-Server through
    UTL_HTTP
    Hope this helps
    Dannys

  • Out put file is not genrated when calling xml reports from OAF page

    Dear all
    i am calling xml reports from OAF page
    the out put file is not generated
    i am writing this code
    public int tradingrequest(String quoid, String costoder,int orgid)
    try
    OADBTransaction tx = (OADBTransaction)getOADBTransaction();
    java.sql.Connection pConncection = tx.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(pConncection);
    String applnName =
    "XXCRM"; //Application that contains the concurrent program
    String cpName = "XXCRM_COSTSHEET"; //Concurrent program short name
    String cpDesc =
    "Trading Costsheet Report XXCRM"; // concurrent Program description
    Number orgid1=new Number(orgid);
    // Pass the Arguments using vector
    Vector cpArgs = new Vector();
    cpArgs.addElement(quoid);
    cpArgs.addElement(costoder);
    cpArgs.addElement(orgid1.toString());
    // Calling the Concurrent Program
    int requestId =
    cr.submitRequest(applnName, cpName, cpDesc, null, false, cpArgs);
    tx.commit();
    System.out.println("Request ID is " + requestId);
    return requestId;
    } catch (RequestSubmissionException e)
    OAException oe = new OAException(e.getMessage());
    oe.setApplicationModule(this);
    throw oe;
    in controller i am writing this code
    OAMessageStyledTextBean y =
    (OAMessageStyledTextBean)webBean.findChildRecursive("quotationid");
    OAFormValueBean z =
    (OAFormValueBean)webBean.findChildRecursive("costorder");
    String quoid = y.getValue(pageContext).toString();
    String costorder = z.getValue(pageContext).toString();
    System.out.println("The quotation id and costing order are....." + quoid +
    " " + costorder);
    /*if click on run report button to run the report*/
    if ("Viewreport".equals(pageContext.getParameter(EVENT_PARAM)))
    if (tsflag.equals("Y"))
    int requestid = am.servicerequest(quoid, costorder, orgid);
    String url =
    "OA.jsp?akRegionCode=FNDCPREQUESTVIEWPAGE&akRegionApplicationId=0&retainAM=Y&addBreadCrumb=Y&REQUESTID=" +
    requestid;
    pageContext.setForwardURL(url, null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT, null,
    null, true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    when i call the report from oaf page the request id is coming
    when i click on view output i am getting this message
    Error
    The concurrent request 7335031 did not create an output file.
    WHEN I GOTO FIND REQUESTS PAGE QUERY THIS REQUEST ID I AM GETTING THE OUTPUT IN XM FILE
    Regards
    Sreekanth

    java.io.FileNotFoundException: \..\..\..\xdoAqdFFZfuuJ051010_0628487460.fo (The system cannot find the path specified)
    MY CO code
    if("GenerateReport".equals(event))
    // Get the HttpServletResponse object from the PageContext. The report output is written to HttpServletResponse.
    DataObject sessionDictionary = (DataObject)pageContext.getNamedDataObject("_SessionParameters");
    HttpServletResponse response = (HttpServletResponse)sessionDictionary.selectValue(null,"HttpServletResponse");
    try {
    // Hashtable hashtable = new Hashtable(1);
    // hashtable.put("TruckBookingRefNum",trucknum);
    // System.out.println("test"+trucknum);
    ServletOutputStream os = response.getOutputStream();
    // Set the Output Report File Name and Content Type
    String contentDisposition = "attachment;filename=LF Cargo Summary Report.htm";
    response.setHeader("Content-Disposition",contentDisposition);
    response.setContentType("application/HTML");
    // Get the Data XML File as the XMLNode
    XMLNode xmlNode = (XMLNode) am.invokeMethod("getTestDataXML");
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    xmlNode.print(outputStream);
    ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
    ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
    System.out.println(" ByteArrayInputStream.ByteArrayOutputStream"+pdfFile+inputStream);
    //Generate the PDF Report.
    TemplateHelper.processTemplate(
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
    "LFCUST",
    "XXLFCARSUM_TARGET",
    "English",//((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
    "US",//((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
    inputStream,
    TemplateHelper.OUTPUT_TYPE_HTML,
    null,
    pdfFile);
    // hashtable);
    System.out.println(" TemplateHelper");
    // Write the PDF Report to the HttpServletResponse object and flush.
    byte[] b = pdfFile.toByteArray();
    System.out.println(" byte"+b);
    response.setContentLength(b.length);
    os.write(b, 0, b.length);
    os.flush();
    os.close();
    pdfFile.flush();
    pdfFile.close();
    catch(Exception e)
    System.out.println(" inside catch");
    response.setContentType("text/html");
    throw new OAException(e.getMessage(), OAException.ERROR);
    pageContext.setDocumentRendered(true);
    Edited by: user9367919 on May 13, 2010 10:31 AM

  • 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 ! :((

  • Calling another report from a report

    just wanna explore the possibility...
    i have a.bat which will call a.rep.
    in a.rep, a function will loop and call b.rep.
    is this possible?

    Hi KLC
    This is prasanth again. In reports we can call a report from another report which is called "drilleddown reports"
    If ur requirement is this one, then we can do this by using SRW builtin called srw.run_report.
    syntax is srw.run_report(reportname,<arguements if any)
    Place a push button in report 'a' and put this code in that button.
    I think this will solve your problem. I dont know exactly what requirement you have. Because for ur last question regarding distribution not clearly understood, so i suggestion is incorrect. any way i am trying to distribute the date based on sql model and i will suggesst you soon, Since i am also a developer,please try my suggestion but i am not sure that will work 100% correctly.
    thans and regards
    prasanth a.s.

  • Call a report in pl/sql

    Hello,
    I have a report and I want to call it from a procedure. How can I do it?
    thank you. regards,
    Amparo

    Not true, you can call it, but you cannot display the report, only write it to a file.
    You can use the srw package for this
    Re: run a report from PL/SQL
    OR Event driven Publishing
    Re: run a report from PL/SQL
    Or a distribution file
    http://download.oracle.com/docs/cd/E12839_01/bi.1111/b32121/pbr_dist005.htm#CHDEFHEE
    http://download.oracle.com/docs/cd/E12839_01/bi.1111/b32121/toc.htm ->
    19.5 Distribution XML File Examples
    Marcus

  • 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

  • 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.

Maybe you are looking for

  • Query disable status in bex query designer

    hi all, when i opened query in query designer for PA_PA cube it is in disabled mode.iam unabled to restrict or do any changes.and giving error like "the dependent objects are in different transport orders."i installed this particular queries in BI co

  • Key performance indicators

    Hi All, What is KPI's in Dashboard? How to Personalized the dashboards (scorecards) to reflect user-specific alerters and mertrics to track critical KPI's? In this please clarify on Metrics? Thanks in Advance...

  • NI Variable Engine (tagsrv.exe) Runtime Error Dialog Upon Restart -- Resolved

    After installing LabVIEW 2009, I started getting an error dialog when I restarted, and shared variables stopped working.  So, I figured I'd post what I did to resolve it. For forums searchability, here's the text: Dialog Window Title: Microsoft Visua

  • Regarding ORA 02063 : preceding line from dblink

    Hi Team, I am facing one issue, while using the DBlink for fetching data from different Database in PLSql. **********Query*********** select a.A, b.B from ABC a, ABC@ XYZ b Please suggest and help me in this regards. Best Regards Manpreet Singh

  • MacBook Pro Retina - Keyboard and Touchpad Unresponsive While Charging

    Hi all, I am having some trouble with my early 2014 15" Retina MacBook Pro. Sometimes when attempting to charge my laptop, if I have been out and about, I can only have the charger plugged in for 30 seconds maximum upon booting up the machine, before