PL/SQL Oracle 11g记录组

tra*_*ace 6 oracle plsql oracleforms oraclereports

从6i升级到Oracle 11g融合中间件.如何将记录组从表单传递到报表?我们使用的是DATA_PARAMETER,但据我所知,这不再是一种选择.

小智 0

下面是调用 for 循环报告的示例代码。这是一个破坏参数并将其传递给 run_report_object 的示例。

\n

https://www.oracle.com/technetwork/developer-tools/forms/frmrepparamform-128021.pdf

\n
PROCEDURE RUN_REPORT_OBJECT_PROC(\nreport_id REPORT_OBJECT,\nreport_server_name VARCHAR2,\nreport_format VARCHAR2,\nreport_destype_name NUMBER,\nreport_file_name VARCHAR2,\nreport_otherparam VARCHAR2,\nreports_servlet VARCHAR2) IS\nreport_message VARCHAR2(100) :=\xe2\x80\x99\xe2\x80\x99;\nrep_status VARCHAR2(100) :=\xe2\x80\x99\xe2\x80\x99;\nvjob_id VARCHAR2(4000) :=\xe2\x80\x99\xe2\x80\x99;\nhidden_action VARCHAR2(2000) :=\xe2\x80\x99\xe2\x80\x99;\nv_report_other VARCHAR2(4000) :=\xe2\x80\x99\xe2\x80\x99;\ni number (5);\nc char;\nc_old char;\nc_new char;\nBEGIN\n VHWWLQJ 5HSRUWV UXQWLPH SDUDPHWHUV\nSET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,\nSYNCHRONOUS);\nSET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,\nreport_file_name);\nSET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,\nreport_server_name);\nSET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,\nreport_destype_name);\nSET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,\nreport_format);\n FUHDWLQJ VWULQJ IRU SIDFWLRQ SDUDPHWHU\nhidden_action := hidden_action ||\xe2\x80\x99&report=\xe2\x80\x99||\nGET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME);\nhidden_action := hidden_action||\xe2\x80\x99&destype=\xe2\x80\x99||\nGET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE);\nhidden_action := hidden_action||\xe2\x80\x99&desformat=\xe2\x80\x99||\nGET_REPORT_OBJECT_PROPERTY (report_id,REPORT_DESFORMAT);\nhidden_action := hidden_action ||\xe2\x80\x99&userid=\xe2\x80\x99\n||get_application_property(username)||\xe2\x80\x99/\xe2\x80\x99||\nget_application_property(password)||\xe2\x80\x99@\xe2\x80\x99||\nget_application_property(connect_string);\nc_old :=\xe2\x80\x99@\xe2\x80\x99;\nFOR i IN 1..LENGTH(report_otherparam) LOOP\nc_new:= substr(report_otherparam,i,1);\nIF (c_new =\xe2\x80\x99 \xe2\x80\x99) THEN\nc:=\xe2\x80\x99&\xe2\x80\x99;\nELSE\nc:= c_new;\nEND IF;\n-- eliminate multiple blanks\nIF (c_old =\xe2\x80\x99 \xe2\x80\x99 and c_new = \xe2\x80\x99 \xe2\x80\x99) THEN\nnull;\nELSE\nv_report_other := v_report_other||c;\nEND IF;\n\nc_old := c_new;\n\nhidden_action := hidden_action ||\xe2\x80\x99&\xe2\x80\x99|| v_report_other;\n \n\nhidden_action := reports_servlet||\xe2\x80\x99?_hidden_server=\xe2\x80\x99||report_server_name\n|| encode(hidden_action);\nSET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,\xe2\x80\x99pfaction=\xe2\x80\x99||\nhidden_action||\xe2\x80\x99 \xe2\x80\x99||report_otherparam);\n-- run Reports\nreport_message := run_report_object(report_id);\nrep_status := report_object_status(report_message);\nIF rep_status=\xe2\x80\x99FINISHED\xe2\x80\x99 THEN\nvjob_id :=substr(report_message,length(report_server_name)+2,length\n(report_message));\nWEB.SHOW_DOCUMENT(reports_servlet||\xe2\x80\x99/getjobid\xe2\x80\x99||vjob_id||\xe2\x80\x99?server=\xe2\x80\x99||\nreport_server_name,\xe2\x80\x99 _blank\xe2\x80\x99);\nELSE\n--handle errors\nnull;\nEND IF;\nEND;\n
Run Code Online (Sandbox Code Playgroud)\n