Home » Developer & Programmer » Forms » calling reports from forms
calling reports from forms [message #425797] Mon, 12 October 2009 04:33 Go to next message
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
Re: calling reports from forms [message #428021 is a reply to message #425797] Mon, 26 October 2009 20:06 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I see that this problem of yours has been solved in your other thread http://www.orafaq.com/forum/t/150921/67467/

David
Previous Topic: Fields scramble when call formis used
Next Topic: How Can I print directly the report from the printer without showing it ?
Goto Forum:
  


Current Time: Fri Dec 06 02:00:24 CST 2024