Home » Developer & Programmer » Forms » pritn report while in form.
pritn report while in form. [message #78121] Fri, 18 January 2002 23:40 Go to next message
Rajesh Mandawat
Messages: 37
Registered: October 2001
Member
Hi,
I am having the table sob and I want to print the
report on form as soon as record is saved. I want
to include some text ( non base table in the report ). How this can be done.

Thanks

Rajesh
Re: pritn report while in form. [message #78123 is a reply to message #78121] Sat, 19 January 2002 06:12 Go to previous messageGo to next message
Shilpa
Messages: 59
Registered: November 2001
Member
Create a parameter at the report level and pass the text (non base table) as the parameter to the report.

In order to print the report when a record is saved use the Run Product or Run report object and set the destination type parameter to the printer in the key commit trigger.
Re: pritn report while in form. [message #78131 is a reply to message #78121] Mon, 21 January 2002 03:13 Go to previous messageGo 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: pritn report while in form. [message #78133 is a reply to message #78131] Mon, 21 January 2002 04:19 Go to previous message
Shilpa
Messages: 59
Registered: November 2001
Member
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: Forms developer
Next Topic: Parameter passing from form to report.
Goto Forum:
  


Current Time: Tue Apr 23 13:37:41 CDT 2024