I am trying to run a report in 10g using form 10g but i am getting the error as "REPORT_OBJECT_STATUS can not be null" can any one help me i am giving my procedure below...
----****
PROCEDURE run_report IS
report_id := FIND_REPORT_OBJECT(v_report);
IF id_null(report_id) then
SET_ALERT_PROPERTY('CFG_ERROR', TITLE, 'Failed to run report!');
SET_ALERT_PROPERTY('CFG_ERROR', ALERT_MESSAGE_TEXT,'Can not find Report...');
v_dummy := SHOW_ALERT('CFG_ERROR');
END IF ;
IF get_application_property(USER_INTERFACE) = 'WEB' THEN
v_pl_id := get_parameter_list(v_pl_name);
IF id_null(v_pl_id) then
SET_ALERT_PROPERTY('CFG_ERROR', TITLE, 'Failed to run report!');
SET_ALERT_PROPERTY('CFG_ERROR', ALERT_MESSAGE_TEXT,'Can not find Parameter list...');
v_dummy := SHOW_ALERT('CFG_ERROR');
END IF ;
--Find the report and then run it,passing the new parameter list to it.
IF get_application_property(USER_INTERFACE) = 'WEB' THEN
MESSAGE('WEB');
report_job_id := RUN_REPORT_OBJECT(report_id, v_pl_id);
IF report_job_id IS NULL THEN
MESSAGE('report_job_id IS NULL...');
MESSAGE('report_job_id IS NULL...');
END IF;
--debug_message('Report_job_id is'||report_job_id);
ELSE
Run_Product(REPORTS, --product name
v_report, --module name
ASYNCHRONOUS, --communication mode
RUNTIME, --execution mode
FILESYSTEM, --location
v_pl_id, --parameter list
null);
END IF;
-- Check to see if the report is going to be run against the web
IF get_application_property(USER_INTERFACE)='WEB' THEN
MESSAGE('status WEB '||report_job_id);
MESSAGE('status WEB '||report_job_id);
rep_status:=REPORT_OBJECT_STATUS(report_job_id);
--debug_message('Rep_status is '||rep_status);
-- Dynamically Set the Job Number
JOB_NUMBER := length(v_repserver) + 2;
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED', null)
LOOP
rep_status:=REPORT_OBJECT_STATUS(report_job_id);
END LOOP;
IF rep_status='FINISHED' THEN
Web.Show_Document('http://' || v_server || ':' || v_port ||'/dev60cgi/rwcgi60.exe/getjobid=' ||substr (report_job_id,JOB_NUMBER)||'?server='||v_repserver,'_blank');
ELSE
message('Report failed with error message '||rep_status);
END IF; -- end of checking report status
END IF; -- end of checking to see if report is running on web.
END IF; -- end of checking parameter list set up ok
Bookmarks