暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle 报告6i

ASKTOM 2021-06-23
478

问题描述

亲爱的所有人
我正在使用Oracle 10g和表单6i/Reports 6i运行客户端/服务器环境。
问题是我想一次在客户端上运行多个报告。i-e
用户可以同时查看多个报告。我给报告打了电话
通过RUN_PRODUCT并使用异步选项,但它将报告排队,
不显示预览。

专家解答

它们确实是相互排斥的。要在后台运行一系列报表,目的是让它们在报表服务器上同时运行,并产生它们的输出。

只有当您想 “暂停” 并在执行任何操作之前查看报告输出时,“预览” 才真正有意义。

要异步运行一堆报告,最好的选择是报告服务器和使用RUN_REPORT_OBJECT而不是RUN_PRODUCT,例如

/* The following example runs a report using the RUN_REPORT_OBJECT Built-in. The
 report_object node defined in Forms Developer is assumed to be "report_node1". A
 user-defined Reports parameter "p_deptno" is passed by Forms using the value in
 the "dept.deptno" field. The Reports parameter form is suppressed */


 DECLARE
 v_report_id              Report_Object;
 vc_report_job_id                  VARCHAR2(100);  /* unique id for each Report      request */
 vc_rep_status                    VARCHAR2(100);           /* status of the Report job */
          
 BEGIN
        /* Get a handle to the Report Object itself. */
        v_report_id:= FIND_REPORT_OBJECT('report_node1');
        SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE, SYNCHRONOUS);
        SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,CACHE);
 
 /* Define the Report output format and the name of the Reports Server as well as
 a user-defined parameter, passing the department number from Forms to the Report.
 The Reports parameter form is suppressed by setting  paramform  to "no". */
        SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT, '');
        /* replace  with the name of the Reports Services as defined
 in your tnsnames.ora file */
        SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER, '');
        SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER, 'p_deptno='||:dept.deptno||'paramform=no');
        /* finally, run the report and retrieve the Reports job_id as a handle to the
 Reports process */
        vc_report_job_id:=RUN_REPORT_OBJECT(report_id);
 
 /*The report output is not delivered automatically to the client, which is okay
 because the Web is a request model. Thus the next step is to check if the report
 finished. */
 
        vc_rep_status := REPORT_OBJECT_STATUS(vc_report_job_id);
        IF vc_rep_status='FINISHED' THEN
 /* Call the Report output to be displayed in a separate browser window. The URL
 for relative addressing is only valid when the Reports Server is on the same host
 as the Forms Server. For accessing a Remote Reports Server on a different
 machine, you must use the prefix http://hostname:port/ */
 web.show_document ('///getjobid='||
 vc_report_job_id ||'?server='|| '','_blank');
        ELSE
        message ('Report failed with error message '||rep_status);
        END IF;
END;


最重要的是 ....报告6i 20岁以上...当然是时候继续前进了
文章转载自ASKTOM,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论