1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
Problem Description
-------------------
You are integrating forms and reports. You are calling reports from forms
using run_report_object built-in. You want to pass a parameter list from
forms to reports.
You have issued the command as follows to pass the parameter list:
set_report_object_property(repid, REPORT_OTHER, pl_id);
When you run the form, you get the following error:
On UNIX
-------
REP-0152: Positional argument specified after keyword.
On Windows
----------
REP-0159: Syntax error on command line.
Solution Description
--------------------
The parameter list is not passed using the set_report_object_property.
You pass the parameter list in the run_report_object command as follows:
v_runrep := run_report_object(repid, pl_id);
Below is an example of using SET_REPORT_OBJECT_PROPERTY and passing a user
defined parameter to the report.
DECLARE
hRep REPORT_OBJECT;
vcRep VARCHAR2(100);
pl_id ParamList;
pl_name VARCHAR2(10) := 'pdata';
BEGIN
pl_id := GET_PARAMETER_LIST(pl_name);
hRep := FIND_REPORT_OBJECT('report1');
SET_REPORT_OBJECT_PROPERTY(hRep,report_destype,file);
SET_REPORT_OBJECT_PROPERTY(hRep,report_desformat,'html');
SET_REPORT_OBJECT_PROPERTY(hRep,report_desname,'rep1.html');
SET_REPORT_OBJECT_PROPERTY(hRep,report_other,'p_deptno=20');
ADD_PARAMETER(pl_id, 'P_EMPNO', TEXT_PARAMETER, c_empno);
vcRep := RUN_REPORT_OBJECT(hRep, pl_id);
END; |
Partager