Srw.run_report

what are the paremeters for srw.run_report?
i looked at the MAIL_IT example for reports, i'm not sure about the quotes in the paremeters.
thanks
null

The instruction is like
SRW.RUN_REPORT('reports_name.rdf parameter_name');
ex: SRW.RUN_REPORT('d:\orawork\reports25\emp.rdf dept="'| |TO_CHAR(:deptno)| |'"');
Teh quotes are obligatory.
null

Similar Messages

  • FUNCTION IS NOT WORKING WHEN RUN IN SRW.RUN_REPORT, URGENT

    Hi,
    I have a report. it has got 1 Query and 2 groups.
    Q1
    |
    |
    __G1__
    |F1 |
    |F2 |
    |F3 |
    |
    |
    |
    __G2__
    |Items|
    |Sales|
    | Qty|
    |Store|
    |Func4|
    |Func5|
    |Func6|
    The Query looks like above. Now In the report I have a 3 User parameters . For Each record in G2 the functions Func4,Func5 and Func6 adds the value to the user parameters at the report level.
    Now the Func1,Func2,Func3 takes the value of last 4 record for each item at each G1 Level and devides it by 4 and prints . As an example given below
    ITEMS-----SALES-------QTY-----------STORE
    10001-----10000-------200-------------100
    10001-----20000-------500-------------200
    10001-----15000-------350-------------175
    10001-----45000-------650-------------225
    10001-----50000-------700-------------300
    AVERAGE==>32500-------550-------------225 ==> Calculated by F1,F2,F3
    20001-----70000-------900-------------400
    20001-----30000-------600-------------350
    20001-----20000-------500-------------300
    20001-----25000-------450-------------275
    20001-----35000-------550-------------225
    20001-----65000-------800-------------400
    AVERAGE==>36250-------650-------------300 ==> Avg of last 4 records
    This report takes an parameter which is part of the Where condition of the Query Q1. If I run this report from the report builder and provide the value for the parameter then the report runs fine printing the exact values. If I run the report from another report(which I have to do, due to circumstances) using SRW.Run_Report and pass the parameter in the same command. The the function FUNC4, FUNC5, FUNC6 does not do the addition, as a result the Func1,Func2,Func3 returns 0. I dont know why this is happenning .
    This is very very URGENT, My project manager is on my head to finish it ASAP. Please help.
    Thanks
    Feroz

    Hi Toby and Danny,
    Thanks for the quick reply. I dont think I am having an interdependancy of the functions. Here is an sample what two functions do at each level
    Func6 =========> This function at group level G2
    begin
    -- To initialize the user parameter for each new item.
         If :CNT = 1 Then
              :Wk4_Pos_Qty := 0;
         End If;          
    -- to add the qty value to the user parameter for last 4 records. Uchange is the no of records for each item     
    If :CNT >= :UCHANGE - 3 Then
         :Wk4_Pos_Qty := :Wk4_Pos_Qty + :Qty;
    End If;     
    return 0;
    end;
    Func3 ======> this function at group level G1
    Begin
    -- if no of records are less than 4 then devide by the no of records or devide by 4.
         If :UChange < 4 Then
                   return((:Wk4_Pos_Qty + :Qty) / :UChange);
         Else
                   return((:Wk4_Pos_Qty + :Qty)/ 4);     
         End If;     
    end;
    Here Wk4_Pos_Qty is the User parameter created to hold the calue for the Um of last 4 records Qty.
    I tried to modify the Func3 so that it looks like this
    Func3
    begin
    srw.reference(:Wk4_Pos_Qty);
         If :UChange < 4 Then
                   return((:Wk4_Pos_Qty + :Qty) / :UChange);
         Else
                   return((:Wk4_Pos_Qty + :Qty)/ 4);     
         End If;     
    end;
    But it does not effect anything. I mean its the same. The Wk4_Pos_Qty returns 0 and Func3 returns 0.
    Any Suggestions .
    Thanks
    Feroz

  • SRW.Run_Report is not working in Reports from 6i to 10g

    Hi,
    I have a report .rdf file that submits another .rdf report using the SRW.Run_Report. This code was working fine in Reports 6i version. We are upgrading the Reports 6i to Reports 10g, and did a small change in the call i.e., Removed the server parameter, and it is not working. This is in Oracle E-Business Suite environment. The first report is called as a Concurrent Program. Here is the call that was working fine in Reports 6i (i.e., Oracle Apps 11i environment)
    srw.run_report('report='||l_source_dir||l_parent_shortname||'.rdf'||
    ' p_user_id='||l_user_id||
    ' p_resp_id='||l_resp_id||
    ' p_appl_id='||l_appl_id||
    ' p_conc_request_id='||
    ' batch=yes mode=character destype=file desname='||l_destination_dir||l_filename||
    ' desformat=verp_i012 p_vendor_id='||dealer_list_rec.vendor_id||
    ' p_trx_date_from='||to_char(l_date_from, 'DD-MON-RRRR') ||
    ' p_trx_date_to='||to_char(l_date_to,'DD-MON-RRRR') ||
    ' p_period_name='||l_period_name ||                                                                      
    ' server='||l_server
    It has been modified to the following for Reports 10g (i.e., Oracle Apps R12 environment)
    srw.run_report('report='||l_source_dir||l_parent_shortname||'.rdf'||
    ' p_user_id='||l_user_id||
    ' p_resp_id='||l_resp_id||
    ' p_appl_id='||l_appl_id||
    ' p_conc_request_id='||
    ' batch=yes mode=character destype=file desname='||l_destination_dir||l_filename||
    ' desformat=verp_i012 p_vendor_id='||dealer_list_rec.vendor_id||
    ' p_trx_date_from='||to_char(l_date_from, 'DD-MON-RRRR') ||
    ' p_trx_date_to='||to_char(l_date_to,'DD-MON-RRRR') ||
    ' p_period_name='||l_period_name
    );

    Thank you for your reply.
    Yes, it's done using MOD-PLSQL version 10.1.2.0.2.
    I did as you said: compared the 2 generated HTML files. It's not that it doesn't generate all tags. It generates all tags but some of them are different, that is it screws them up.
    Here it is some example code.
    For example, in 9i I have the following code:
    div id=div_plus_GENERALE style="cursor:hand; display:none;"
    <td> width=8 </td>
    <td id=butt align=left style="font-family:Verdana,Tahoma;
    font-size: 10px; font-weight: 400; color: '#ffffff';
    background-color: '';
    "onClick="if (butt_clicked) butt_clicked.style.cssText=restore_butt_style;
    butt_clicked=this; restore_butt_style=butt_off_lit;
    this.style.cssText=butt_on_lit;
    var x = document.getElementById('Freccia_' + freccia_old);
    x.style.display = 'none';
    Freccia_sitointer_anagrafica_anagrafica_cliente_punto.style.display='block';
    freccia_old='sitointer_anagrafica_anagrafica_cliente_punto';"
    onMouseOver="this.style.cssText=butt_on_lit;"
    onMouseOut="if (butt_clicked != this) this.style.cssText=butt_off_lit;">Anagrafica Fornitura</td></tr>
    <tr>
    <td height=2></td>
    </tr>
    </table>
    In 10g the HTML code looks like this:
    div id=div_plus_GENERALE style="cursor:hand;"
    <td width=8> </td>
    <td align=left style="font-family:Verdana,Tahoma;
    font-size: 10px; font-weight: 400; color: '#ffffff';
    background-color: '';">
    <a href="sitointer.anagrafica.anagrafica_cliente_punto target="frameCenter"
    onClick="var x = document.getElementById('Freccia_' + freccia_old);
    x.Style.visibility='hidden';
    Freccia_sitointer_anagrafica_anagrafica_cliente_punto.Style.visibility='visible';
    freccia_old='sitointer_anagrafica_anagrafica_cliente_punto';"
    onMouseOver="this.style.cssText=butt_on_lit;"
    onMouseOut="if (butt_clicked != this) this.style.cssText=butt_off_lit;">Anagrafica Fornitura</a></td></tr>
    <tr>
    <td height=2></td>
    </tr>
    </table>
    At this point I don't know what should I investigate next.
    Thank you very much.
    Daniela

  • SRW,Run_Report not working on Report Server

    1 The plan is to do a select in the mother report. Get a number of rows, among them a company name, which the SQL is sorted on.
    2 In the data model I have a function that checks if a global variable is the same as the company name. If not, it will set the global variable equal to the company name, and then it will run a global defined function that starts the SRW.Runreport call that generates a PDF for this company.
    3 Next row the same thing will happen, and maybe the function is run again, or maybe it is the same company, in which case the SRW function will be skipped.
    The report runs nicely from reports builder, but when I try running it on the server it fails with error: REP-1401: 'cf_doc_trans_letterformula': Fatal PL/SQL error occurred. ORA-06508: PL/SQL: could not find program unit being called.
    I use following web link to start the “mother” report: http://Rep_server/reports/rwservlet?SERVER=origo_report&USERID=user%2Fpassw%40tns_name&AUTHID=user2%2Fpassw2&DESTYPE=cache&DESFORMAT=rtf&Report=temp.rdf
    In the temp.rdf the following statement is executed: SRW.Run_Report('BATCH=YES DESTYPE=FILE DESFORMAT=pdf DESNAME='||P_Desname||'.pdf REPORT='||P_REPORT||'');
    Are there any special settings I must make, when running on a Reports Server as opposed to the Reports Ruilder? Do I need a SERVER=REP_SERVER in the SRW.Run_Report parameter list?
    Any suggestions at all will be immensely appreciated.

    Hi,
    Top right cornor has a text box. Type "bobj is undefined" & you would find many KBs, forums & blogs.
    http://www.sdn.sap.com/irj/scn/advancedsearch?query=bobjisundefined
    Thanks,
    Saurabh

  • How to use srw.run_report without userid parameter in 10g

    I have the following function which works fine when I supply the userid parameter.
    Is it possible to run srw.run_report without the userid? If not is there another way to run a batch report to create a file?
    create or replace
    FUNCTION SUNRESDS(vopersorjudicial varchar2)
    RETURN VARCHAR2 as
    myPlist SRW_PARAMLIST;
    myIdent SRW.Job_Ident;
    BEGIN
    myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));
    srw.add_parameter(myPlist,'GATEWAY','http://xxx.xx.xxx.xx/reports/rwservlet');
    srw.add_parameter(myPlist,'SERVER','rep_172_FRHome1');
    srw.add_parameter(myPlist,'REPORT','d:\oracle\FRHome_1\forms\sunresds.jsp');
    srw.add_parameter(myPlist,'USERID','username/password@databasename');
    srw.add_parameter(myPlist,'DESTYPE','file');
    srw.add_parameter(myPlist,'DESFORMAT','PDF');
    srw.add_parameter(myPlist,'popersorjudicial',vopersorjudicial);
    srw.add_parameter(myPlist,'DESNAME','d:\Reports\unresolved_discrepancies.pdf');
    myIdent := srw.run_report(myPlist);
    return 'Y';
    EXCEPTION
    when others then
    return ('sunresds ' || sqlerrm);
    END;

    Did you solve your problem? How did you do?

  • Forms 6i & SRW.Run_Report does not work on 10g client

    Hello Sir/Madam,
    I'm using 10g client with Forms & Reports 6i.
    FORMS 6i error => for some reason this combination is prompting FRM-10102 & FRM-40039 errors
    Attempted so far => attached the library, complied, it compiles ok, but somehow loses the library file at runtime
    Reports 6i issue => for Reports seems like it does not recognize SRW.Run_report built-in
    Attempted to run without "srw.run_report" it works..
    Please help me understand if any necessary "*.dll" files are missing? if so what might that be?
    Regards,
    Vani Sonti

    When you install Forms and Reports 6i, the correct Oracle client (8) is installed. I don't know what you did exactly, but you shouldn't try to change that.
    You can install the 10g client, but in a separate Oracle home. This way Forms and Reports still use the 8 client.
    FRM-10102 & FRM-40039 errorsThat looks like a problem in your forms60_path registry setting.

  • Font subsetting issue with srw.run_report

    I have PDF subsetting as
    "Courier" = "MSGOTHIC.TTC"
    I have a report emp.rdf. This emp report just displays the data from emp table.
    I have a report dept.rdf. This dept report just displays the data from dept table.
    In the after report trigger of the dept, I added
    srw.run_report(report=emp destype=file desname=emp.pdf desformat=pdf);
    I am running the dept report from command line as
    rwclient server=<servername> userid=<user/pwd@db> report=dept destype=file desname=dept.pdf desformat=pdf
    The report hangs. I tried moving the after report trigger to before report trigger and it fails too.
    Any ideas?

    Hi,
    Can you try running this report from the Reports Builder, ie, use File > Generate to file > pdf, and see if both the master and child files are generated.
    If yes, can you post both server and engine trace file contents (last few lines) of the instance when you run it from the server, and not from Builder.
    Navneet.

  • Error while running SRW.RUN_REPORT

    Hi All,
    I have requirement where i need to generate multiple reports with single request.
    I have created to sample tables test1 and test2 with two columns each.I have created a paper report using first table and saved it as test.rdf in my c: drive and I created the second report using second table and with in Before Report Trigger i called the first report using srw.run_report('report = c:\test1.rdf desformat=screen'); .
    When I ran the second report its showing an error messg REP-1428 :Error while running SRW.RUN_REPORT.
    Can any one help me to resolve this issue.
    Regard
    Srinivas Pusa

    Why can't you use two queries (one for test1 and another for test2) and create many pages (reports) one report? srq.run_report is avoided completely.

  • Using srw.run_report in report server

    Dear all,
    I'm running a report (report A) on the report server and after it is running (printing output on screen), I need to run report B at the background and save the output of report B to the file system. In the report A's After Report Trigger, I have a srw.run_report function, the syntax is: srw.run_report('server='||v_serverName||' report='||v_reportName||' batch=yes destype=file desname=/tmp/output.pdf desformat=pdf p_startdate=''12-JUN-2003'' p_enddate=''14-JUN-2003'''). When I run the above syntax (without the server name part) in report builder, it works fine. But I couldn't get it working on the report server. Each time report A runs, report B couldn't be run at all (no job id was given or scheduled). Could anyone give me an idea on whether srw.run_report could be used in the report server?
    Many thanks for your urgent help.
    Rose

    Can I use this build it to run itself? I mean in your case run report A?
    our report is launched from servelet. because of some security issues, I would like to use this built in to change it to command line after user enter all the parameters through the parameter form.
    thanks.

  • Diff bet. run_product and srw.run_report

    In reports 6i is there any difference in architecture between using run_product and srw.run_report(which according to 6i doc calls rwrun60.exe)? The reason is I that have the same report submitted by the above two processes produce font difference in the output pdf file. One gives courier and the other gives courier new where as my actual report font is courier.
    Is ther any difference in the architecture?(run_product uses any in-process report server where as rwrun submits to the report server??)?
    Any advice or suggestion or pointers will be highly appreciated!!

    Hi Venkat
    Ensure that your uifont.ali does not have aliases for Courier font under the [Global] or [Printer] section.
    Regards
    Sripathy

  • Doubt in srw.run_report

    hi all,
    i tried to call one report from other using srw.run_report,the below code is working fine
    but i give destype=screen or preview then its getting error.im using report 10g.
    how to use this?
    function BeforeReport return boolean is
    begin
    srw.run_report('batch=yes report=e:\REP\CALL_REPORT\emp.rdf
    destype=file desformat=PDF desname=e:\REP\CALL_REPORT\emp2.PDF');
    return (TRUE);
    end;

    srw.run_report package may not be used in webservice. It does fit to server/client application.

  • Srw.run_report problem

    Hi all,
    i'm trying to run a report inside another report using srw.run_report routine, but i get the following error:
    REP-0110: Impossible to open file 'app/OA11i/NOCE/software.ds/noceappl/xxene/11.5.0/reports/I/XXENE_PROPACCPDRNOINT.rdf'
    the full command that i use is: srw.run_report('report=app/OA11i/NOCE/software.ds/noceappl/xxene/11.5.0/reports/I/XXENE_PROPACCPDRNOINT.rdf desname=DL006345.pdf destype=file desformat=pdf batch=yes P_PDR_ID=10015 P_DATA_ATTIVAZIONE=20-FEB-07 P_USE_SITE=LEGAL');
    Thanks for the help,
    bye
    Simona

    Hello Simona,
    Below is the definition of the error you are getting:
    Cause:     Report Builder tried to open the file shown and could not.  The possible causes of this error include the following:       
            Case 1:     The file was not found under the specified name in the specified location. 
            Case 2:     You lacked the necessary privileges to open the file. 
            Case 3:     A system error made it impossible to open the file. 
    Action:     You can take the following actions to correct this error:       
            If Case 1:     Make sure the file is stored in the specified directory under the specified name.  If it is not, change the directory and/or filename as appropriate. 
            If Case 2:     Make sure that you have the privileges necessary to open the file.  If you do not, change your privileges accordingly. 
            If Case 3:     Consult your operating system documentation or contact your system administrator.Hope this helps.
    -Marilyn

  • Srw.run_report desformat=pdf, output is missing

    Hi,
    Could someone please help me with the following:
    I have 2 reports, rep1.rdf and rep2.rdf.
    rep1.rdf has a formula column in which I invoke rep2.rdf with the following syntax:
    srw.run_report('report=rep2.rdf '||
    ' destype=file'||
    ' desname=test.pdf'||
    ' desformat=pdf'||
    ' background=Yes');
    On the client (windows2000), it works fine. After completion there is a test.pdf file in my directory.
    When I run the report from the concurrent manager from Oracle Applications 11i, I don't get an error message, but there isn't a pdf file created.
    Has someone any suggestions? I'm allready searching for 2 days and I'm not finding the solution...
    Thanks,
    Martine Vanderveken.

    It may be that rep2.rdf is not in REPORTS60_PATH. You can turn on tracing (tracefile=youTraceFile.txt traceopts=trace_all) and error file (errfile=yourErrorFile.txt) to see if there are any errors being detected which aren't being report through the concurrent manager log files. You can also use srw.message() functions to add to these tracefiles or the PL/SQL file IO functions to trace yourself.

  • SRW.RUN_REPORT Passing parameter

    Hello,
    I am calling a report from another report.
    Like the example in help, I have my call in the before report trigger.
    If I call a report that does not need a parameter, it works great. However I cannot make it work when passing a parameter in.
    here is what I have:
    srw.run_report('report=h:\reports\GQR003GL batch=yes destype=printer p_break='||:break||' p_group_quote_iid='||:group_quote_iid);
    Why is this not working?

    Hello Chris,
    You can have a SRW.RUN_REPORT call in your BeforeReport Trigger. Please try coding your trigger something like the one below. Take care to include the white spaces delimiters between consecutive parameters when appending them to the commandline string.
    function BeforeReport return boolean is
    cmdline varchar2(200);
    begin
    cmdline := 'BATCH=YES';
    cmdline := cmdline || ' DESTYPE=PRINTER';
    cmdline := cmdline || ' DESFORMAT=DFLT';
    cmdline := cmdline || ' REPORT=<report_file>';
    cmdline := cmdline || ' P_GROUP_QUOTE_IID=' || :group_quote_iid;
    cmdline := cmdline || ' P_BREAK=' || :break;
    srw.run_report(cmdline);
    return (TRUE);
    end;
    Thanks,
    The Oracle Reports Team.

  • SRW.RUN_REPORT Parameters

    On a non-Web publishing, what would the following parameter be set as in the RUN_REPORT procedure
    Gateway,Server & CMDkey
    I have a report created and I want to call this in the PL/SQL block using SEW package, can I do that without having the HTTP server running. I dont need this report to be called from the Web Browser.
    What would be the values that would be set for the Gateway then?
    Can you please help me.
    TiA,
    Shri

    SRW.RUN_REPORT('report=ports paraform=no'|| :port));
    in above syntax what is the error
    please reply
    You have two closing parenthesis that's why.-------------------------------------------------------------------------------
    Where to put the code:
    normally... You will put the code in before report trigger.
    to define the parameter...
    srw.run_report('parameter1=param_value');
    insert ----> parameter1=param_value <-- somewhere in the comand line, there should be no problem with that.

Maybe you are looking for

  • Problem display query in web

    Hi experts We trying to see query  to the web, from query designer we are klicking to display query to web, but that open only balnk page. Also need a detail or step by step help link for WAD Please help me and get points Thanks in advance

  • LOGO not going when sending the report as Email attachement

    Hi We are calling reports in two ways (both as html format) to be sent as Email. The report includes company logo at the top 1.Running report in cache through Web.Show_document and copy it by using copy_report_object_output and displaying it using We

  • TC: S_ALR_87012284

    < MODERATOR:  Message locked.  Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time. > Hi , When i excute TC "S_ALR_87012284 ". With Following parameters company Code

  • Creating UDL file for use of HFMCopyApplication utility

    I'm trying to create the UDL file on the HFM server to link to the SQL database where HFM sits. I followed the instructions and created a new text document, rename it as extension .udl. According to the instruction, I'm supposed to double click on th

  • New button help

    i want to add a new drop down movie clip button to this fla, can anyone take a look and help me, i would credit you in the html, http://www.megaupload.com/?d=JWW4TDGK please help me ! the website is www.sandslandscaping.com i want it to say John Deer