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: 75
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 :
./fa/13377/0/

Please help me by sharing your valuable technique.

Thanks in advance.

Regards

Mahmud
  • Attachment: pdf_msg.png
    (Size: 68.44KB, Downloaded 139 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: 12929
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is it actually printing?
Why are you using web.show_document?
Previous Topic: Oracle Reports to BI Publisher report conversion
Next Topic: Excell Report Genearation With Formula Column
Goto Forum:
  


Current Time: Thu Nov 23 06:53:21 CST 2017

Total time taken to generate the page: 0.01785 seconds