problem in running report [message #216963] |
Wed, 31 January 2007 01:35 |
verkiles
Messages: 15 Registered: November 2006 Location: Philippines
|
Junior Member |
|
|
hi,
I have a problem with reports.
I try to get the value of REPORT_OBJECT_STATUS function and this is the result:"TERMINATED_WITH_ERROR"
What I'am confused is that some reports ran successfully while other reports will have "TERMINATED_WITH_ERROR" error.
below is my code:
PROCEDURE proc_run_report
IS
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(50);
BEGIN
repid := find_report_object(REPORT1);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'HTML');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'REP_SERVER');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no trandate=' ||to_char(:control.s_tran_date,'DD-MON-YYYY'));
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(v_rep);
END LOOP;
IF rep_status = 'FINISHED' THEN
/*Display report in the browser*/ WEB.SHOW_DOCUMENT('http://test:7782/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=REP_SERVER' ,'_blank');
ELSE
message('Error when running report');
END IF;
END;
[Updated on: Wed, 31 January 2007 20:55] Report message to a moderator
|
|
|