Printing to more than one printer from Paramform [message #358858] |
Wed, 12 November 2008 13:10 |
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 |
hisham99
Messages: 106 Registered: October 2008 Location: united arab emirates
|
Senior 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 #382690 is a reply to message #359068] |
Fri, 23 January 2009 10:32 |
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;
|
|
|