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
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 #425291 is a reply to message #124016] Thu, 08 October 2009 07:15 Go to previous messageGo to next message
KAPILAGG29
Messages: 3
Registered: September 2009
Junior Member

have any one knows this answer as i am also getting this problem

[EDITED by LF: removed unnecessary quote of the whole previous message]

[Updated on: Thu, 08 October 2009 13:26] by Moderator

Report message to a moderator

Re: RUN_REPORT_OBJECT issue on Forms 10g [message #427058 is a reply to message #124016] Tue, 20 October 2009 19:21 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

Do you have the reports in the same directory as your forms?

I stroingly recommend removing nearly everything except the 'web.show_document'. You do not need the 'run_report_object' or 'rep_status' loop and analysis.

David
Re: RUN_REPORT_OBJECT issue on Forms 10g [message #427059 is a reply to message #425291] Tue, 20 October 2009 19:22 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please do not resurrect old posts.

David
Re: RUN_REPORT_OBJECT issue on Forms 10g [message #427073 is a reply to message #427059] Tue, 20 October 2009 23:09 Go to previous messageGo to next message
KAPILAGG29
Messages: 3
Registered: September 2009
Junior Member

Ya i have solved the problem actually i was trying using reports in web layout but it supports paper layout.


Thanks for the reply......
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 messageGo to next message
kamal480
Messages: 5
Registered: June 2006
Location: UAE
Junior Member

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;
Re: RUN_REPORT_OBJECT issue on Forms 10g [message #457336 is a reply to message #456891] Mon, 24 May 2010 00:10 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please look at the examples for 'web.show_document' in http://www.oracle.com/technology/products/forms/pdf/277282.pdf\

Look at the examples on pages 31 and higher. Do not use the examples which require the use of 'run_report_object'.

David
Previous Topic: explain "reports_servlet" in web.show_document
Next Topic: where is error
Goto Forum:
  


Current Time: Wed Sep 28 14:13:45 CDT 2016

Total time taken to generate the page: 0.12244 seconds