0 Replies Latest reply: Aug 21, 2013 12:23 PM by 1005774 RSS

    Help Modifying run_report_object to work in Oracle 11g

    1005774


      I need help with my code.  I'm running the Weblogic 10.3.6 and Oracle 11gR2 Forms/Reports.  My original Forms/Reports was working in Oracle 10g Forms/Reports, but now i can't figure out how to modify the code to run in 11g with "in-process" report server.  I know you can omit the server name in the web.show_document, but not sure how to modify this code. Help Please...

       

      Procedure ReportXXX is

           ro_report_id                    REPORT_OBJECT;

           str_report_server_job     varchar2(100);

           str_job_id                         varchar2(100);

           str_url                              varchar2(100);

           PL_ID                              PARAMLIST;

       

      Begin

           PL_ID := Get_parameter_list('TEMPDATA');

      if not ID_NULL(PL_ID) then

           DESTROY_PARAMETER_LIST(PL_ID);

      END IF;

       

      PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');

      RO_Report_ID := FIND_REPORT_OBJECT('NAME OF REPORT IN OBJECT NAVIGATOR');

      ADD_PARAMETER(PL_ID, 'V_PROJ_CD', TEXT_PARAMETER, 'C7I');

       

      SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_FILENAME, 'actual location of the report to run');

      SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_COMM_MODE, SYNCHRONOUS);

      SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_EXECUTION_MODE, BATCH);

      SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_OTHER, 'paramform=no;);

       

      SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESTYPE, FILE);

      SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'PDF');

      SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_SERVER, 'REP1');  --with Oracle 11g using "in-process" so how to reference?

       

      Str_Report_Server_Job := RUN_REPORT_OBJECT (RO_Report_ID, PL_ID);

      Str_Job_ID := substr(str_report_server_job, length('REP1') + 2, length(str_report_server_job));

      str_URL  := '/reports/rwservlet/getjobid' || str_job_id || '?server=REP1';

      WEB.SHOW_DOCUMENT(STR_URL, '_SELF');

      DESTROY_PARAMETER_LIST(PL_ID);

      end;

       

       

      thank you,

       

      steven