从 Oracle Forms 获取 Oracle Reports 中的参数

Getting a parameter in Oracle Reports from Oracle Forms

我想使用 web.show_document() 将参数从表单传递到报表,我在 URL 中添加了参数,但我不知道如何在报表中获取它并使用它.. 有人对此有想法吗?

提前致谢:)

要将参数传递给 Oracle Forms 中的报表,您应该使用 paramlist 并通过 run_report_object built-in 传递它,然后您可以使用 web.show_document 调用报表,方法是传递报告编号。您不能在 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'
         );