|
Re: calling report10g throught form10g [message #241240 is a reply to message #239660] |
Mon, 28 May 2007 23:51 |
habib.khan
Messages: 20 Registered: March 2007 Location: Islamabad
|
Junior Member |
|
|
---------------WHEN-BUTTON-PRESSED triger--------
-----------Write code in this button triger-------
Declare
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
BEGIN
repid := find_report_object('EMPLOYEE');
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,'repo');
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://habib:8889/reports/rwservlet/getjobid' ||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repo','_blank');
ELSE
message('Error when running report');
END IF;
END;
try it.it is working.
Muhammad habib
[Updated on: Tue, 29 May 2007 00:02] Report message to a moderator
|
|
|