Srw.get_report_name error

I got an Oracle report 6i report where I use srw.get_report_name(:c_reportname) and it works fine when I'm using it.
But when the report is handed over to my client and run on their database (in same way as I do) an error appears :
REP-1418: 'beforepform': Passed nuu arguments to SRW.GET_VALUE
How come ?
Regards
Kim

in zxrsru01, one input i need is the report technical name as the variable logic is only specific to a particular report. the variable however is also used elsewhere, that is why i would like to ensure the logic will only be executed if the executing report is a particular one.

Similar Messages

  • Dynamic Sql giving error

    Hi,
    I am creating a BIP report and it is giving an issue on generating Data XML in OTM application.
    The Report XML is simple query and taking input parameter for shipment_gid, the parameter is handled in SET_LEXICAL_PARAMETER to add where clause and append “=” with the passed value of parameter &P_SHIPMENT_GGID.
    When I try to generate data XML in Query template, it is giving below error
    java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
    I have tried to change parameter in many ways in SET_LEXICAL_PARAMETERS, but still getting error. Please check the XML and package and advice.
    XML
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <dataTemplate name="pri_sec_ocean_fcl_booking_view" defaultPackage="pri_sec_ocean_fcl_booking_view" version="1.0">
    <properties>
    <property name="xml_tag_case" value="upper" />
    </properties>
    <parameters>
    <parameter name="P_GL_USER" dataType="character" defaultValue="ULE.ADMIN" />
    <parameter name="P_ROLE_ID" dataType="character" defaultValue="ADMIN" />
    <parameter name="P_L_SHIPMENT_GGID" dataType="character" defaultValue="1=1" />
    </parameters>
    <lexicals />
    <dataQuery>
    <sqlStatement name="Q_1">
    <![CDATA[SELECT
                             CT.FIRST_NAME||' '||CT.LAST_NAME||' Email '||CT.EMAIL_ADDRESS||'PHONE1 '||CT.PHONE1||'PHONE2 '||CT.PHONE2 BOOKER_ID
                   FROM      SHIPMENT_INVOLVED_PARTY SH,
                             CONTACT CT
                             &P_L_SHIPMENT_GGID
                   AND        SH.INVOLVED_PARTY_QUAL_GID               =     'CARRIER_BOOKING_OFFICE'
                   AND          SH.INVOLVED_PARTY_CONTACT_GID          =     CT.CONTACT_GID
       ]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="afterParameterFormTrigger" source="pri_sec_ocean_fcl_booking_view.afterpform" />
    <dataTrigger name="beforeReportTrigger" source="pri_sec_ocean_fcl_booking_view.beforereport" />
    <dataStructure>
    <element name="P_L_SHIPMENT_GGID" dataType="varchar2" value="pri_sec_ocean_fcl_booking_view.P_L_SHIPMENT_GGID" />
    <group name="G_1" dataType="varchar2" source="Q_1">
    <element name="BOOKER_ID" dataType="varchar2" value="BOOKER_ID"/>
    </group>
    </dataStructure>
    <dataTrigger name="afterReportTrigger" source="pri_sec_ocean_fcl_booking_view.afterreport()" />
    </dataTemplate>
    Package
    create or replace PACKAGE pri_sec_ocean_fcl_booking_view IS
    DESNAME VARCHAR2(200);
    DESTYPE VARCHAR2(100);
    DESFORMAT VARCHAR2(200):='PDF';
    P_GL_USER VARCHAR2(128);
    P_ROLE_ID VARCHAR2(1000);
    P_DATABASE_CONN_STRING VARCHAR2(50);
    P_FILE VARCHAR2(100);
    P_PDF_HYPERLINK VARCHAR2(1000);
    P_REPORT_GID VARCHAR2(101);
    P_XML_HYPERLINK VARCHAR2(1000);
    P_DOMAIN VARCHAR2(50);
    P_KEEP_FILE_FLAG VARCHAR2(1);
    P_LANGUAGE_ID VARCHAR2(30);
    P_RPT_JOB NUMBER;
    P_FORMAT VARCHAR2(40);
    P_DATE_FORMAT VARCHAR2(15);
    P_TIME_FORMAT VARCHAR2(32767);
    P_REPORT_CALL VARCHAR2(1000);
    P_GLOG_USER VARCHAR2(30);
    P_GLOG_USER_PASS VARCHAR2(30);
    P_REPORT_PHYSICAL_NAME VARCHAR2(100) := 'PRI_SEC_OCEAN_FCL_BOOKING_VIEW';
    P_WITHIN_REPORT VARCHAR2(1);
    P_REPORTS_OUT_DIR VARCHAR2(100);
    P_REPORTS_SERVER VARCHAR2(100);
    P_SHIP_START_RANGE DATE;
    P_SHIP_END_RANGE DATE;
    P_GROUP_BY VARCHAR2(2000);
    P_REP_USERID VARCHAR2(100);
    P_L_SHIPMENT_GGID VARCHAR2(32766) := '1=1';
    P_L_CONTAINER_NUMBER_WHERE VARCHAR2(32766) := '1=1';
    P_H_CONTAINER_NUMBER VARCHAR2(32766);
    FUNCTION P_FORMATVALIDTRIGGER(DESTYPE IN VARCHAR2) RETURN BOOLEAN;
    FUNCTION BEFOREREPORT RETURN BOOLEAN;
    FUNCTION AFTERREPORT RETURN BOOLEAN;
    FUNCTION BEFOREPFORM RETURN BOOLEAN;
    FUNCTION AFTERPFORM RETURN BOOLEAN;
    FUNCTION P_SHIP_END_RANGEVALIDTRIGGER RETURN BOOLEAN;
    FUNCTION VALUE_ENTERED(LEX_NAME IN VARCHAR2) RETURN BOOLEAN;
    PROCEDURE SET_LEXICAL_PARAMETERS;
    END PRI_SEC_OCEAN_FCL_BOOKING_VIEW;
    create or replace
    PACKAGE BODY PRI_SEC_OCEAN_FCL_BOOKING_VIEW IS
    FUNCTION P_FORMATVALIDTRIGGER(DESTYPE IN VARCHAR2) RETURN BOOLEAN IS
    BEGIN
    IF DESTYPE = 'Cache' AND P_WITHIN_REPORT = 'N' THEN
    IF P_FORMAT = 'View PDF' THEN
    DESFORMAT := 'PDF';
    ELSIF P_FORMAT = 'View HTML' THEN
    DESFORMAT := 'HTMLCSS';
    END IF;
    END IF;
    RETURN (TRUE);
    END P_FORMATVALIDTRIGGER;
    FUNCTION BEFOREREPORT RETURN BOOLEAN IS
    BEGIN
    REPORTS_LIBRARY.SET_VPD(P_GL_USER);
    /*SRW.SET_BEFORE_REPORT_HTML(SRW.TEXT_ESCAPE
    ,BUILD_HTML_HEADER)*/NULL;
    /*SRW.SET_AFTER_REPORT_HTML(SRW.TEXT_ESCAPE
    ,BUILD_HTML_FOOTER(P_REPORT_GID
    ,P_LANGUAGE_ID))*/NULL;
    RETURN (TRUE);
    END BEFOREREPORT;
    FUNCTION AFTERREPORT RETURN BOOLEAN IS
    BEGIN
    REPORTS_LIBRARY.SET_VPD(P_GL_USER);
    IF DESTYPE = 'File' THEN
    RPT_GENERAL.P_INSERT_LOG(P_FILE
    ,P_REPORT_GID
    ,P_RPT_JOB
    ,P_GL_USER
    ,P_DOMAIN);
    END IF;
    RETURN (TRUE);
    END AFTERREPORT;
    FUNCTION BEFOREPFORM RETURN BOOLEAN IS
    BEGIN
    REPORTS_LIBRARY.SET_VPD(P_GL_USER);
    /*SRW.SET_AFTER_FORM_HTML(SRW.TEXT_ESCAPE
    ,BUILD_AFTER_FORM_HTML)*/NULL;
    RETURN (TRUE);
    END BEFOREPFORM;
    FUNCTION AFTERPFORM RETURN BOOLEAN IS
    V_STRING VARCHAR2(32750);
    WS_DATE VARCHAR2(30);
    V_BOOLEAN BOOLEAN;
    BEGIN
    REPORTS_LIBRARY.SET_VPD(P_GL_USER);
    V_BOOLEAN := REPORTS_LIBRARY.GET_USER_PREFERENCES(P_GL_USER,P_ROLE_ID
    ,P_DATE_FORMAT
    ,P_TIME_FORMAT
    ,P_LANGUAGE_ID);
    V_STRING := RTRIM(REPORTS_LIBRARY.BUILD_LOCALIZATION_STRING(P_REPORT_GID
    ,P_LANGUAGE_ID));
    /*SRW.APPLY_DEFINITION*/NULL;
    IF P_KEEP_FILE_FLAG = 'Y' THEN
    WS_DATE := '_' || TO_CHAR(SYSDATE
    ,'YYMMDDHHMI');
    END IF;
    P_FILE := LOWER(TRANSLATE(TRANSLATE(P_DOMAIN || '_' || P_REPORT_GID
    ,'_') || P_RPT_JOB || WS_DATE || '.' || DESFORMAT);
    DESNAME := LOWER(P_REPORTS_OUT_DIR || '/' || P_FILE);
    /*SRW.GET_REPORT_NAME(P_REPORT_PHYSICAL_NAME)*/NULL;
    P_REPORT_PHYSICAL_NAME := RTRIM(P_REPORT_PHYSICAL_NAME);
    P_PDF_HYPERLINK := P_REPORT_CALL || '?' || P_REP_USERID || ' server=' || P_REPORTS_SERVER || ' report=' || P_REPORT_PHYSICAL_NAME || ' destype=CACHE desformat=PDF p_gl_user=' || P_GL_USER || ' p_within_report=Y' || ' P_REPORT_GID=' || P_REPORT_GID || ' p_l_time_period=' || ' p_l_named_range=' || ' p_rep_userid=' || P_REP_USERID;
    P_XML_HYPERLINK := P_REPORT_CALL || '?' || P_REP_USERID || ' server=' || P_REPORTS_SERVER || ' report=' || P_REPORT_PHYSICAL_NAME || ' destype=CACHE desformat=XML p_gl_user=' || P_GL_USER || ' p_within_report=Y' || ' P_REPORT_GID=' || P_REPORT_GID || ' p_l_time_period=' || ' p_l_named_range=' ||' p_rep_userid=' || P_REP_USERID;
    SET_LEXICAL_PARAMETERS;
    RETURN (TRUE);
    END AFTERPFORM;
    FUNCTION P_SHIP_END_RANGEVALIDTRIGGER RETURN BOOLEAN IS
    BEGIN
    RETURN (TRUE);
    END P_SHIP_END_RANGEVALIDTRIGGER;
    FUNCTION VALUE_ENTERED(LEX_NAME IN VARCHAR2) RETURN BOOLEAN IS
    BEGIN
    IF LEX_NAME > ' ' AND LEX_NAME <> '1=1' AND LEX_NAME IS NOT NULL THEN
    RETURN (TRUE);
    ELSE
    RETURN (FALSE);
    END IF;
    END VALUE_ENTERED;
    PROCEDURE SET_LEXICAL_PARAMETERS IS
    PLS_ORIG_P1 VARCHAR2(32766);
    BEGIN
    P_L_SHIPMENT_GGID := REPLACE(P_L_SHIPMENT_GGID
    ,'~'
    IF VALUE_ENTERED(P_L_SHIPMENT_GGID) THEN
    P_L_SHIPMENT_GGID := 'WHERE SH.P_L_SHIPMENT_GGID ' || REPORTS_LIBRARY.GET_FILTER_CONDITION(P_L_SHIPMENT_GGID,NULL,'Y');
    ELSE
    P_L_SHIPMENT_GGID := '1=1';
    END IF;
    END SET_LEXICAL_PARAMETERS;
    END PRI_SEC_OCEAN_FCL_BOOKING_VIEW;
    Thanks,
    Dev

    Hi Dev,
    I am not aware that you could change the value of P_L_SHIPMENT_GGID this way.
    One quick way to test that will be to set it to default to something like 'where 1=2' in your concurrent program and see if it runs but produce no results.
    If it indeed does run, then it confirms my thinking.
    You can then do something like this;
    Try creating a global variable in your pri_sec_ocean_fcl_booking_view package header, say G_L_SHIPMENT_GGID.
    Calculate your lexical string and put it in G_L_SHIPMENT_GGID.
    Reference G_L_SHIPMENT_GGID in your query
    FROM SHIPMENT_INVOLVED_PARTY SH,
    CONTACT CT
    &G_L_SHIPMENT_GGID
    .......Kofi

  • How to Skip srw.run_report_failure

    Dear Sir,
    How to skip srw.run_report_failure from the loop of report execution.
    My problem is I have thousands of running report through the report by using the srw.run_report procedure.When ever any report fails my report server getting crash.So now i want to skip from this crash and run another report.My question is how to overcome the
    srw.run_report_failure error inside the for loop
    regards
    Mathew

    Dear All,
    Thanks for watching my Thread,problem got solved
    Regards
    mathew

  • FRM-41213 When calling report from a form using RUN_REPORT_OBJECT

    Hi,
    I get an error frm-41214:unable to connect to the report server when i am trying to call a report from a form using RUN_REPORT_OBJECT.
    My code is as follows:
    I have created a simple report using employee table such tht when i give the department number as parameter it should get the corresponding details along with that i also have highlited the system parameters:
    DESFORMAT
    DESNAME
    DESTYPE
    also other user parameters as
    p_action
    p_servername
    p_user_connect
    and in the before parameter form trigger the following code:
    function BeforePForm return boolean is
    vc_parameter_form VARCHAR2(4000);
    vc_hidden_runtime_values VARCHAR2(1000);
    vc_report_name VARCHAR2(100);
    begin
    IF (:P_ACTION = '_action_') THEN
         vc_hidden_runtime_values := '_hidden_';
    ELSE
         srw.get_report_name(vc_report_name);
              vc_hidden_runtime_values:='report='||vc_report_name||'&destype='||:destype||'&desformat='
    ||:desformat||'&userid='||:p_user_connect||'&server='||:p_servername;
    END IF;
    vc_parameter_form:='<html><body bgcolor="#ffffff"><form method=post action="'
    ||:P_ACTION||'">'||'<input name="hidden_run_parameters" type=hidden value="'
    ||vc_hidden_runtime_values||'">'||'<center><p><table border=0 cellspacing=0 cellpadding=0><tr><td>'
    ||'<input type=submit></td><td width=15><td><input type=reset></td>'||'</tr></table><p><hr><p>';
                        srw.set_before_form_html(srw.text_escape,vc_parameter_form);
    return (TRUE);
    end;
    After this i created a form with department table as my datablock:
    I created a report object in the form with name REPORT6.
    -Created a procedure in the form with the following code
    PROCEDURE RUN_REPORT_OBJECT_PROC(report_id REPORT_OBJECT,reportserver VARCHAR2,runformat VARCHAR2) IS
    report_message VARCHAR2(100);
    rep_status VARCHAR2(100);
    vc_user_name VARCHAR2(100);
    vc_user_password VARCHAR2(100);
    vc_user_connect VARCHAR2(100);
    vc_connect VARCHAR2(300);
    BEGIN
    vc_user_name:=get_application_property(username);
    vc_user_password:=get_application_property(password);
    vc_user_connect:=get_application_property(connect_string);
    vc_connect:=vc_user_name||'/'||vc_user_password||'@'||vc_user_connect;
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,ASYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,runformat);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,reportserver);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'p_deptno='
    ||:Dept.Deptno
    ||' paramform=yes P_USER_CONNECT='
    ||vc_connect||' P_SERVERNAME='||reportserver
    ||' P_ACTION=http://iitv-1:8888/reports/rwservlet?');
    report_message:=run_report_object(report_id);
    rep_status := report_object_status(report_message);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')LOOP
    rep_status := report_object_status(report_message);
    END LOOP /* Wait for Report to be finished */;
    IF rep_status='FINISHED' then
    web.show_document('http://iitv-1:8888/reports/rwservlet/getjobid'||
    substr(report_message,instr(report_message,'_',-1)+1)||'?server'
    ||reportserver,'_blank');
    ELSE
    message (rep_status||' Report output aborted');
    END IF;
    END;
    I created a press button and in the when_button_pressed trigger i added the following code:
    declare
         repid REPORT_OBJECT;
         repserver VARCHAR2(100);
         runformat VARCHAR2(10);
    BEGIN
         repid := find_report_object('REPORT6');
         repserver := 'rep_iitv-1';
         runformat := 'HTML';
         run_report_object_proc(repid,repserver,runformat);
         END;
    Then tried to run the form but i got this error frm-41213 unable to connect to the report server.
    Any one please help me.

    Run_report_object can't work with forms9i
    Regards
    Vikas Singhal

  • How to Print File Path and File Name at the bottom of the Report?

    Hi guys,
    I have situation where i have to display my file path where i save my file. For example: U:\Reports\Monthly_Reports\Compay_xyz.jsp
    also, after the file path line if its possible i would like to display the date where the last modification done on the file.
    I read one of the post and some one suggested that use srw.get_report_name() but since i am a new to Reporting i am not sure how to use it.
    Can anyone describe me little bit in detail please?
    Thank You.

    Hi,
    Your logic seems to be fine and you should put it in the additional plsql code section "After displaying the page". But you may have to check you syntax by compiling it. You cannot use "LINEFEED". It should be '<br>'. This is the line break in html. Please check your type declaration. Also some ';' is missing after some statements.
    Hope that helps.
    Thanks,
    Sharmila

  • Get report file name in oracle report builder at run time

    Dear All,
    Is there any way to get the report file name in oracle report builder at run time?
    for example "HR_REP012.REP"
    i need this very important...
    Regards,
    Yousef
    Edited by: Yousef_m on Jun 2, 2012 5:18 AM

    Hello,
    Did you try the builtin SRW.GET_REPORT_NAME built-in function ?
    Example
    function AfterPForm return boolean is
    my_var varchar2(80);
    BEGIN
    SRW.GET_REPORT_NAME(my_var);
    SRW.MESSAGE(0,'Report Filename = '||my_var);
    RETURN (TRUE);
    END;
    Regards

  • Get the report name in reports 6i??

    Hi!!
    I need to get the report name from reports 6i, in forms i can get the form name whit :SYSTEM.CURRENT_FORM, but in reports this is not possible.
    How Can I get the name of the report??
    Thanks!
    Regards!!
    Edited by: JuaNiNNaio on 30-jun-2009 9:55

    Try srw.get_report_name!

  • Print Report name in Header

    Hello to anyone!!!
    I wonder if there is a way to print on the report header the file name of the report (e.g. myreport.rdf) in a parametric way..
    You could send me a reply here or in the following address
    [email protected]
    Thanks a lot!

    Create a user parameter and set it's default value to the name you're saving the file as. If the filename does change, you can still pass in the new name without having to modify the report.
    You can get the name of the report displayed using srw.get_report_name().

  • Report name in field

    I just curious if you can set the report name to a text label or field. I can get the name through the SRW package but I can't get it to bind to label or field.

    Set up a new parameter in the user parameter section of the data model. Say :P_REPNAME.
    In the before report trigger add this line of code:
    srw.get_report_name(:P_REPNAME) ;
    In the layout add a new boilerplate and put in the text
    &P_REPNAME
    When you run teh report the boilerplate should have the report name displayed

  • Report Name on Template

    I wish to have the report name sent to the template so that at runtime the report name will show. I have created a parameter for this to be passed to, and put a field in the header of the template to accept the parameter: what I need to know is how do you send the name of the report which exists in the property palette under -Report -General Information - Name node to the field on the template so it shows at runtime.

    hello,
    with patch 4 there is a procedure called srw.get_report_name(v_name); that retuns the report-name.
    regards,
    the oracle reports team

  • Get report info

    hi,,
    In forms we can "get_application_property(FORM_NAME)"
    Is there a similar function in Reports 6i(c/s)
    Or some other way that we could "get" the "Report name" (eg. MY_REP) dynamically in Reports using some sort of function or something...
    Thanks,
    Looking 4 ward to your thoughts.
    N>

    Call SRW.GET_REPORT_NAME.

  • Report name

    I want to print report name at runtime but I cant find. I use form name on forms by get_application_property('current_form') but i cant find for report.
    Can anyone Help
    MAQ

    You can use the SRW.GET_REPORT_NAME call to get the file name of the report being run.
    Thanks
    The Oracle Reports Team

  • Determining & displaying filename at runtime.

    I need to display my report's filename on each report. Rather than simply adding a boilerplate to each report, can I dynamically query 'something' to retrieve the current filename?
    I know I can do it in forms (get_for_property) but don't know for Reports. Any ideas?
    Thanks in advance.
    John.

    Try putting the following code in a FUNCTION (cf+) and referencing it via a field object in the report.
    DECLARE
      my_var varchar2(10) ;
    BEGIN
      Srw.get_report_name(my_var);
      Srw.message(0, 'Report Filename = '|| my_var);
    END;Thanks,
    N.

  • Dinamic Logo in Header Reports

    I've a table with two field. Emp_Name-Varchar2(30), Logo (BLOB). I want that report show me the logo on the header report, reading from these table, dynamically. I mean that when I pass Emp_Name as a parameter to the report, the report execute an sql that show me the logo on HEADER, not into the report body.
    How can I do that?

    I suggest you create this code as your first query in the data model
    select blob_column
    from table_name
    where report_name=srw.get_report_name;
    This way you wont need to supply a parameter for the query because reportwriter will know the name of the report running. - this depends on your setup
    This will create a blob column for your layout just like any other column. All you need to do is place it in the header section.
    I am not sure if it is possible to this into a parameter????????????
    Lewis

  • Getting Report Name

    Is there a way to call a Windows API that will return the name of the report that is currently running?? Seems Reports doesn't offer any method to retrieve the filename of the executable .rep file during report execution so one can place the name in the headings. Has anyone had any luck doing this without passing the report name in as a parm?, etc.?
    Thanks
    null

    Hello Tariq,
    You can use the SRW.GET_REPORT_NAME builtin to get the current report's name programmatically at runtime. Please refer the Reports Online Help for further information and examples for using this builtin.
    Thanks,
    The Oracle Reports Team.

Maybe you are looking for

  • Currency field in service PR

    hi currency field in service PR for item category D and B is greyed out, it cant be changed according  to sap note do u have any workaround or any other alternative how this can be chnaged?

  • EMOD HELP- understanding campaign recipient metrics - need emod pro

    Hi, I have sent a Campaign out to 27k customers on the 19th January (first time EMOD user). I need to create reports and analyses based on recipient metrics. So far, I have loaded a report using the Campaign Response History in CRM Reports and downlo

  • Problem with MuVo V100 "No Music&qu

    My son got a Creative MuVo V00 GB as a gift a month ago. It was easy to put music on it. I loaded about 50 songs for him and he enjoyed listening to them. Then I tried to add another few songs for him and all seemed to be fine. Then he said all of th

  • My firefox toolbars are not visible when I open firefox

    All of my firefox toolbars are not visible when I open firefox. I get the tabs but no command menu no search bar or any other toolbar icons help!! == This happened == Every time Firefox opened == when I logged on one day about 2 weeks ago == == User

  • Turn off marking email as read?

    I'm using Mail 3.5. How do I stop emails being automatically marked as 'READ' once I've scrolled onto it? I want to be able to leave it as 'UNREAD' until i double click on the email so it opens in another window, the same way the Outlook does. I know