Home » Developer & Programmer » Reports & Discoverer » printing report
printing report [message #121112] Thu, 26 May 2005 02:47 Go to next message
mdamjad
Messages: 45
Registered: May 2005
Member
I am using report 2.5 and and forms 4.5 and using run_product in
when_button_press trigger and want to as so as i press button the report should start printing ie no preview
Re: printing report [message #121124 is a reply to message #121112] Thu, 26 May 2005 04:21 Go to previous message
Gurusubramanyam
Messages: 79
Registered: July 2001
Member
Hi,

You can use the parameters PARAMFORM,DESTYPE & DESNAME to route the report output directly to the default printer.

Hope the below example will be helpful to you.


Bye,
-G.S



DECLARE

P_REPORT_NAME VARCHAR2(100) := 'TEST';
l_param_name VARCHAR2(40) := P_REPORT_NAME || '_param';
l_pl_id PARAMLIST;
P_Prntr VARCHAR2(4000) := "\\PC178\HP178" --Network Prntr
P_COPIES NUMBER := 1;


BEGIN

l_pl_id := GET_PARAMETER_LIST ( l_param_name );
IF ID_NULL (l_pl_id) THEN
l_pl_id := CREATE_PARAMETER_LIST ( l_param_name );
END IF;

ADD_PARAMETER (l_pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
ADD_PARAMETER (l_pl_id, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');

--- If you want to print it to a specific printer then
--- then assign the value to the P_Prntr
ADD_PARAMETER(l_pl_id,'DESNAME',TEXT_PARAMETER,P_Prntr);

--- To pass the number of copies as parameter.
ADD_PARAMETER(l_pl_id,'COPIES',TEXT_PARAMETER,TO_CHAR(P_COPIES));

---- pass the parameter list to the RUN_PRODUCT

RUN_PRODUCT(REPORTS, P_REPORT_NAME, SYNCHRONOUS,BATCH, FILESYSTEM,l_pl_id,NULL);

END;




Previous Topic: Printing Report on Custom Size Paper - Reports 6i
Next Topic: Dynamically change the sequence of groups - Reports 6i
Goto Forum:
  


Current Time: Fri Nov 22 14:54:51 CST 2024