Error while calling Report from Forms 10g [message #254550] |
Fri, 27 July 2007 01:56 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ShaShalini
Messages: 59 Registered: January 2007
|
Member |
|
|
Hi All
I am trying to call a report from forms. I have been able to call the report in pdf format and it works fine. But my requirement is that the report should be printed directly .. And this gives me error. I am using forms 10g , application server is SUN Solaris Sparc 10.
I just get the error enable to run report .
The code is as follows
DECLARE
v_report_id Report_Object;
vc_ReportServerJob VARCHAR2(100);
vc_rep_status VARCHAR2(100);
vjob_id VARCHAR2(100);
choice number;
BEGIN
v_report_id := FIND_REPORT_OBJECT('REP_CMS');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,printer);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER,'rep_sun6_Ora10gAS');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER,
' paramform=no' ||' copies=1');
vc_ReportServerJob := RUN_REPORT_OBJECT(v_report_id);
vjob_id := substr(vc_ReportServerJob,length('rep_sun6_Ora10gAS')+2,length(vc_ReportServerJob));
vc_rep_status := REPORT_OBJECT_STATUS(vc_ReportServerJob);
IF vc_rep_status = 'FINISHED' THEN
ALERTS.STOP_ALERT ('Report Printed'||vc_rep_status,choice);
ELSE
ALERTS.STOP_ALERT ('Report failed with error message '||vc_rep_status,choice);
END IF;
END;
|
|
|
|
|
|
|