calling reports from forms [message #425797] |
Mon, 12 October 2009 04:33 |
charuamit
Messages: 121 Registered: January 2009
|
Senior Member |
|
|
hi
the code i used 2 call a report from a form z:
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(20);
begin
repid := find_report_object('REPORT118');
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_DESNAME,'DEP_ROOM.rdf');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'html');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'repserver90');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'P1='||:DP_NAME);
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
WEB.SHOW_DOCUMENT('http://Dell05-246.hct.org:8889/reports/rwservlet/getjobid'|| substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
ELSE
message('Error when running report');
END IF;
EXCEPTION
WHEN OTHERS THEN
MESSAGE(SQLERRM);
end;
it works well the parameter has no space (eg Finance) but for values with spaces (Business Studies etc) , it throws FRM 41214...at the backend also we have the values with spaces.
please help me
thanks
Charu
|
|
|
|