Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I am so glad that I found your site, it is an excellent resource and has helped me greatly..."

Geography

Where in the world do Tek-Tips members come from?
vpv (Programmer)
3 Dec 03 4:33
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?
sem (Programmer)
3 Dec 03 4:58
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
http://seminihin.narod.ru

vpv (Programmer)
3 Dec 03 5:08
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.
sem (Programmer)
4 Dec 03 9:06
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
http://seminihin.narod.ru

vpv (Programmer)
5 Dec 03 1:08
thank's, Sem.
it need write full path to report's file....
sem (Programmer)
5 Dec 03 2:03
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
http://seminihin.narod.ru

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close