Home » Developer & Programmer » Reports & Discoverer » Printing to more than one printer from Paramform (Oracle Reports 10g on Linux)
Printing to more than one printer from Paramform [message #358858] Wed, 12 November 2008 13:10 Go to next message
dlwixon
Messages: 92
Registered: September 2008
Member
Hi,

I would like to allow the users three printer options on their parameter form for the desname:


'Office Printer'
'Warehouse Printer'
'Both'

When the user selects 'Office Printer' I want :desname := <printer_number_A>;

when the user selects 'Warehouse Printer' I want the :desname := <printer_number_B>;

when the user selects 'Both' I want the :desname := <both printer_number_A and printer_number_B>;

Any help with this would be appreciated.
Re: Printing to more than one printer from Paramform [message #358909 is a reply to message #358858] Wed, 12 November 2008 23:28 Go to previous messageGo to next message
hisham99
Messages: 86
Registered: October 2008
Location: united arab emirates
Member
in form you can add 3 check box (no,no1,both)
for check box (no,no1,both) property you can do this
value when check :1
value when check :0
initial value:0

-go to form and add parameter (pl_id)

-add push button to run the report
use when-press-button trigger and write trigger like tis


BEGIN
pl_id := get_Parameter_List('pl_name');
IF NOT id_null(pl_id) THEN
Destroy_Parameter_List(pl_id);
END IF ;
PL_ID := CREATE_Parameter_List('pl_name');

ADD_PARAMETER (PL_ID, 'DESTYPE', TEXT_PARAMETER, 'printer');
if :no=1 then
ADD_PARAMETER (PL_ID, 'DESNAME',TEXT_PARAMETER, 'printer_number_A');
end if;

if :no=1 then
ADD_PARAMETER (PL_ID, 'DESNAME',TEXT_PARAMETER, 'printer_number_b;
end if;

if :both=1 then
ADD_PARAMETER (PL_ID, 'DESNAME', TEXT_PARAMETER, 'printer_number_A'||','||'printer_number_b');
end if;
Run_Product(REPORTS, 'C:\report_name,, SYNCHRONOUS,RUNTIME,FILESYSTEM,PL_ID,NULL);
end;

Re: Printing to more than one printer from Paramform [message #359068 is a reply to message #358909] Thu, 13 November 2008 11:22 Go to previous messageGo to next message
dlwixon
Messages: 92
Registered: September 2008
Member

I'm sure that would work.

However, I need to have the logic in the parameter form on the report and not on a form that calls the report.

Thanks anyway.
Re: Printing to more than one printer from Paramform [message #382690 is a reply to message #359068] Fri, 23 January 2009 10:32 Go to previous message
dlwixon
Messages: 92
Registered: September 2008
Member
To make this work, you can

1)Create a second report so that you're not calling your report recursively in an endless loop.

2) create a parameter on the parameter form where the user can select the location.

3)Add the three locations to the parameter's list of values.

4) Make sure the "Restrict List to Predetermined Values" checkbox is checked.


5) In the program units of the report, add an afterreport function.

6) In the function, check the location that the user selects:
if both then
srw.run_report(send second report to printer 1);
srw.run_report(send second report to printer 2);
elsif office printer then
srw.run_report(send second report here to office printer);
else
srw.run_report(send second report here to warehouse printer);
end if;


Previous Topic: Report Builder 10.1.2.0.2
Next Topic: Creating Web template in Report Builder
Goto Forum:
  


Current Time: Fri Dec 09 17:15:34 CST 2016

Total time taken to generate the page: 0.39971 seconds