Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Reports v3 or v6 and the Windows Print Dialog
I've done my own dll library which calls the window's Api function PrintDlg
and returns a selected printer.
Bruce Moore пишет в сообщении <9n34gb$qhk$1_at_grendel.conectiv.net> ...
>Okay, I have a report that is being launched from Forms. I want the
>parameter screen suppressed (easy enough), but I want the Windows Print
>Dialog to appear so the user can pick the printer the report shoudl go to.
>Using the following code in a program unit, I launch the report:
>list_id := create_parameter_list('input_params');
>add_parameter(list_id,'PARAMFORM',text_parameter,'NO');
>add_parameter(list_id,'DESTYPE',text_parameter,'Printer');
>add_parameter(list_id,'DESNAME',text_parameter,' ');
>add_parameter(list_id,'COPIES',text_parameter,'1');
>add_parameter(list_id,'PRINTJOB',text_parameter,'YES');
>add_parameter(list_id,'PNBR',text_parameter,:printdiag.equpmnt_prmt_nbr);
>add_parameter(list_id,'DBSRC',text_parameter,:global.db_source);
>run_product(REPORTS,'permits',SYNCHRONOUS,RUNTIME,FILESYSTEM,list_id);
>destroy_parameter_list('input_params');
>As you can see, the PARAMFORM=NO turns off the display of the Oracle
reports
>parameter screen. This works. I also included the PRINTJOB=YES parameter,
>which should cause the Windows Print Dialog to appear. This does not occur.
>If I supply no name in the desname parameter, the report goes to the
default
>printer. If I put a fake name in the desname, the report bombs, saying
>invliad printer. If I place a BLANK printer name in desname, it still fills
>with the default printer. This is starting to bug me. Can anyone help?
>
Received on Wed Sep 05 2001 - 01:12:32 CDT