Home » Developer & Programmer » Forms » Parameter passing from form to report.
Parameter passing from form to report. [message #78132] Mon, 21 January 2002 03:16 Go to next message
Rajesh Mandawat
Messages: 37
Registered: October 2001
Member
Parameter passing from form to report.

I . Problem

I made the invoice for :sob no ‘S0001’ . Now I have one button on print on the form.
Now I want to print the invoice for sob no=’S0001’. For this I have created the parameter
Say psobno. And write the following code on print button.

declare
sob_parm paramlist;

begin
sob_parm :=create_parameter_list('psobno');
if not id_null(sob_parm) then
add_parameter(sob_parm,'psobno',text_parameter,:sob.sobno);
Run_Product(REPORTS,'d:enqbillun1.rdf', SYNCHRONOUS,RUNTIME,FILESYSTEM, sob_parm, NULL);
destroy_parameter_list(sob_parm);
end if;
end;

this is working for all sob no.
How will I pass the parameter psobno from form to report query so that it will query only for sobno=’S0001’. If don’t want to make the parameter at report level.

2. Problem is :

I have some non base table item on form. Now I want to print the value of that text item to invoice. How will I pass the these text parameter from form to report text item source.

Rajesh
Re: Parameter passing from form to report. [message #78135 is a reply to message #78132] Mon, 21 January 2002 04:34 Go to previous message
Shilpa
Messages: 59
Registered: November 2001
Member
Posting the answer again:

Solution for Problem 1:
In the where clause of the query in the report include the following statement

where sobno = :psobno

psobno is the parameter you created at the report level.
sobno is the field in the table.

Solution for Problem 2:
Do the same thing as you did for problem 1. Don't change your where clause in the query at the report level. Instead create a field in the layout editor and set the source to the parameter you created at the report level for non base table item.

Hope this helps
Previous Topic: pritn report while in form.
Next Topic: Re: designer 6i repository installation
Goto Forum:
  


Current Time: Thu Mar 28 17:37:43 CDT 2024