Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help. Run report with parameters...

Status
Not open for further replies.

vpv

Programmer
Oct 30, 2003
24
RU
I try to run report with parameters from my form.
In my report i define four user parameter:
acc - number(25)
cur - char(3)
date1 - data ('DD.MM.RR')
date2 - data ('DD.MM.RR')
Trigger "when-mouse-click" PushButton in my form:

declare
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(20);
pl_id1 ParamList;
cr varchar2(3);
acc varchar2(20);

BEGIN
pl_id1 := Get_Parameter_List('vpv_list');
IF NOT Id_Null(pl_id1) THEN
Destroy_Parameter_List(pl_id1);
END IF;
go_block('PCR');
if substr:)pcr.ipcracc,6,3)=810 then
cr:='RUR';
else
cr:='USD';
end if;
pl_id1 := Create_Parameter_List('vpv_ex12');
acc:=:pcr.ipcracc;
Add_Parameter(pl_id1, 'ACC',TEXT_PARAMETER, acc);
Add_Parameter(pl_id1, 'CURR', TEXT_PARAMETER, cr);
Add_Parameter(pl_id1, 'DATE1', DATA_PARAMETER, to_date:)pcr.dpcrsdt,'DD.MM.RR'));
Add_Parameter(pl_id1, 'DATE2', DATA_PARAMETER, to_date:)pcr.dpcrfdt,'DD.MM.RR'));

Run_Product(REPORTS, 'vyp_par', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id1, NULL);
END;

but i get error: FRM-47012 Cannot add parameter DATE1 to Parameter List. Group 01-DEC-03 does not exist.

What i make wrong?
 
DATA_PARAMETER should hold recordgroup name and is used for passing ARRAYS of data between applications. If you need to pass DATE or any other scalar parameters, you should pass it as TEXT_PARAMETER.

Regards, Dima
 
I correct this..but now reports not response..
Reports background engine type that unable open 'vyp_par.rep Error while opening or saving a document.
What is this?
if i run this report without parameters
repid := find_report_object('VYP');
v_rep := RUN_REPORT_OBJECT(repid);
all ok.
?????
P.S. i have rights only on SELECT in oracle schema.
 
What is in report log? I think that vyp_par.rep is not within REPORTSxx_PATH. You may also check real file name in report object definition. BTW, Run_Product works only with client/server deployment. What version/deployment do you use?

Regards, Dima
 
thank's, Sem.
it need write full path to report's file....
 
Don't do it, because you can not distribute your application: it wouldn't work on another directory structure. Set REPORTSxx_PATH environment (registry) variable, where xx stands for reports version(25, 30, 60 or empty for 9i) to includ directory where your report is located.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top