Home » Developer & Programmer » Reports & Discoverer » Report Print without Preview (Oracle Forms 11g R2)
Report Print without Preview [message #658820] Tue, 27 December 2016 22:21 Go to next message
mahmud732
Messages: 82
Registered: October 2009
Location: Dhaka
Member
Dear all,
I have a form with a button that preview report when pressed on this button.It works nicely. Now i want to print this report without display, i.e I would like to press on the button then it will be printed directly without preview.
For this I have add the following codes :

PROCEDURE CR_REPORT IS
vc_reportserver varchar2(256) :='rep_wls_reports_win-45cino0npb2_asinst_1';
vc_runformat varchar2(256) :='PDF';
v_report_id Report_Object;
vc_reportoj varchar2(256) :='MRECEIPT';
vc_ReportServerJob varchar2(100);
vc_rep_status varchar2(100);
vjob_id varchar2(100);
BEGIN
v_report_id:=FIND_REPORT_OBJECT(vc_reportoj);

SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT, vc_runformat);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,PRINTER);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER, vc_reportserver);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER,'PRECEIPTNO=' ||:RECPTNO || ' paramform=no');
vc_ReportServerJob:=RUN_REPORT_OBJECT(v_report_id);

vjob_id:=substr(vc_ReportServerJob,instr(vc_ReportServerJob,'_',-1)+1);
vc_rep_status:=REPORT_OBJECT_STATUS(vc_ReportServerjob);

IF vc_rep_status = 'FINISHED' THEN
WEB.SHOW_DOCUMENT('http://10.10.0.38:9002/reports/rwservlet/getjobid'||substr(vc_ReportServerJob,instr(vc_ReportServerJob,'_',-1)+1)||'?'||'server=rep_wls_reports_win-45cino0npb2_asinst_1','_blank');
ELSE
message('Report failed with error message '||vc_rep_status);
END IF;
END;

when I press on the button then i got report status as 'FINISHED' But display the following message :
/forum/fa/13377/0/

Please help me by sharing your valuable technique.

Thanks in advance.

Regards

Mahmud
  • Attachment: pdf_msg.png
    (Size: 68.44KB, Downloaded 2155 times)
Re: Report Print without Preview [message #658976 is a reply to message #658820] Tue, 03 January 2017 03:45 Go to previous message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is it actually printing?
Why are you using web.show_document?
Previous Topic: discoverer 11g configuration fails
Next Topic: Oracle Reports to BI Publisher report conversion
Goto Forum:
  


Current Time: Thu Mar 28 03:26:23 CDT 2024