2016-01-04 96 views

回答

1

要傳遞的參數中的Oracle Forms報告,你應該使用paramlist,並使之通過run_report_object內置之後,你可以通過將呼叫使用web.show_document報告報告ID。你不能傳遞web.show_document報告運行參數,下面是例子:

pi_id := Create_parameter_list ('rep_param'); 

     Add_parameter (pi_id, 
        'PARAMFORM', 
        TEXT_PARAMETER, 
        'no'); 
     --- report object 
     --- the below report object 'cproreport' must be created in Report object navigator. 

     repid := Find_report_object ('cproreport'); 

     Set_report_object_property (repid, report_filename, Rtrim(:parameter.report_path)||preport); 
     Set_report_object_property (repid, report_server, :parameter.r_server); 
     Set_report_object_property (repid, report_execution_mode, RUNTIME); 
     Set_report_object_property (repid, report_comm_mode, SYNCHRONOUS); 
     Set_report_object_property (repid, report_destype, cache); 
     Set_report_object_property (repid, report_desformat, pformat); 

     vc_reportserverjob := Run_report_object (repid, pi_id); 

該運行web.show_document後如下:

report_job_id := 
     Substr (vc_reportserverjob, 
       Length (:parameter.r_server) + 2, 
       Length (vc_reportserverjob)); 
     v_rep_status := Report_object_status (vc_reportserverjob); 

     If v_rep_status = 'FINISHED' 
     Then 
     web.show_document (
       'http://' 
      || :parameter.host 
      || ':' 
      || :parameter.port 
      || '/reports/rwservlet/getjobid' 
      || report_job_id 
      || '?server=' 
      || :parameter.r_server, 
      '_blank' 
     );