Home » Developer & Programmer » Forms » RUN_REPORT_OBJECT issue on Forms 10g
RUN_REPORT_OBJECT issue on Forms 10g [message #124016] |
Wed, 15 June 2005 17:38 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
jdeponte
Messages: 7 Registered: June 2005
|
Junior Member |
|
|
Hi, I'm running a report from forms 10g, using the sample code and procedure run_report_object_proc but am having this problem:
1.- The report shows the parameter form in the browser but when enter value and select submit query doesn`t show anything!! show a white html page, I called the procedure from a bottom:
repid := find_report_object('REPORT18');
RUN_REPORT_OBJECT_PROC(repid,'repser','HTMLCSS',CACHE,'REGRAF2','paramform=yes','/reports/rwservlet');
2.- From Reports 10g, the report module works ok
3.- The Report server and everything else apparently are working.
PLease if anyone knows about this,,help!
this is the code I am using:
------ RUN_REPORT_OBJECT_PROC ------------
PROCEDURE RUN_REPORT_OBJECT_PROC(report_id REPORT_OBJECT,
report_server_name VARCHAR2,
report_format VARCHAR2,
report_destype_name NUMBER,
report_file_name VARCHAR2,
report_otherparam VARCHAR2,
reports_servlet VARCHAR2) IS
report_message VARCHAR2(100) :='';
rep_status VARCHAR2(100) :='';
vjob_id VARCHAR2(4000) :='';
hidden_action VARCHAR2(2000) :='';
v_report_other VARCHAR2(4000) :='';
i number (5);
c char;
c_old char;
c_new char;
BEGIN
-- setting Reports runtime parameters
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,report_file_name);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,report_server_name);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,report_destype_name);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,report_format);
-- creating string for pfaction parameter
hidden_action := hidden_action ||'&report='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME);
hidden_action := hidden_action ||'&destype='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE);
hidden_action := hidden_action ||'&desformat='||GET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT);
hidden_action := hidden_action ||'&userid=' ||GET_APPLICATION_PROPERTY(username)||'/'||
GET_APPLICATION_PROPERTY(password)||'@'||
GET_APPLICATION_PROPERTY(connect_string);
-- report other parameters are passed as key value pairs "key1=value1 key2=value2 ..."
-- the following loop replaces the delimiting blank with an '&' used on the Web. This
-- replacement does only work for values that don't include blanks themselves. If this is a
-- requirement, you need to customize this code accrodingly
-- c_old is initialized with a dummy value
c_old :='@';
FOR i IN 1..LENGTH(report_otherparam) LOOP
c_new:= substr(report_otherparam,i,1);
IF (c_new =' ') THEN
c:='&';
ELSE
c:= c_new;
END IF;
-- eliminate multiple blanks
IF (c_old =' ' and c_new = ' ') THEN
null;
ELSE
v_report_other := v_report_other||c;
END IF;
-- save current value as old value
c_old := c_new;
END LOOP;
hidden_action := hidden_action ||'&'||v_report_other;
-- report_servlet contains the full path to the Reports Servlet
-- Example1, Forms and Reports are on the same host
-- reports_servlet:='/reports/rwservlet'
-- Example2, Forms and Reports are on separate hosts
-- reports_servlet:='http://host:port/reports/rwservlet'
hidden_action := reports_servlet||'?_hidden_server='||report_server_name||encode(hidden_action);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,'pfaction='||hidden_action||' '||report_otherparam);
report_message := run_report_object(report_id);
rep_status := report_object_status(report_message);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(report_message);
END LOOP;
IF rep_status = 'FINISHED' THEN
message('FINO: '||rep_status);
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||
substr(report_message,instr(report_message,'_',-1)+1)||'?'||'server=repser','_blank');
ELSE
message('Error when running report'||rep_status);
END IF;
/* IF rep_status='FINISHED' THEN
vjob_id :=substr(report_message,length(report_server_name)+2,length(report_message));
WEB.SHOW_DOCUMENT(reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name,' _blank');
ELSE
--handle errors
null;
END IF; */
END;
|
|
|
|
|
|
|
Re: RUN_REPORT_OBJECT issue on Forms 10g [message #456891 is a reply to message #427073] |
Thu, 20 May 2010 00:23 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kamal480
Messages: 5 Registered: June 2006 Location: UAE
|
Junior Member |
![kamal_yyy%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
dear all,
i'm very tired of this issue i followed your instrctuctions step by step and here is my code and still not working.
declare
report_id Report_Object;
ReportServerJob VARCHAR2(100);
vc_rep_status VARCHAR2(100);
vjob_id VARCHAR2(100);
repsvr varchar2(21) := 'rep';
BEGIN
report_id:= find_report_object('xx');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,cache);
--SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESNAME,'rpout1.html');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,'pdf');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,repsvr);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER, 'paramform=no');
ReportServerJob:=run_report_object(report_id);
vjob_id := substr(reportserverjob,length(repsvr)+2);
vc_rep_status := REPORT_OBJECT_STATUS(ReportServerJob);
WHILE vc_rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED', null)
LOOP
vc_rep_status:=REPORT_OBJECT_STATUS(ReportServerJob);
END LOOP;
IF vc_rep_status='FINISHED' THEN
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'|| vjob_id ||'?server='||repsvr,'_blank');
ELSE
message ('Report failed with error message '|| vc_rep_status||sqlcode);
END IF;
END;
|
|
|
|
Goto Forum:
Current Time: Mon Feb 10 04:00:07 CST 2025
|