Home » Developer & Programmer » Reports & Discoverer » Problem while running two reports consecutively (Report Builder 10.1.2.0.2, Windows 7)
Problem while running two reports consecutively [message #642446] Fri, 11 September 2015 00:25 Go to next message
limig
Messages: 10
Registered: April 2010
Location: Asia
Junior Member
Can't two reports be called one after another at the press of a button from Forms? Doing this is always showing the 2nd report only. What should be done?
[Report Builder 10.1.2.0.2 in Windows 7]

Re: Problem while running two reports consecutively [message #642454 is a reply to message #642446] Fri, 11 September 2015 02:52 Go to previous messageGo to next message
cookiemonster
Messages: 13726
Registered: September 2008
Location: Rainy Manchester
Senior Member
What code are you using currently?
Re: Problem while running two reports consecutively [message #642459 is a reply to message #642454] Fri, 11 September 2015 04:14 Go to previous message
limig
Messages: 10
Registered: April 2010
Location: Asia
Junior Member
From Forms, the following is called:
RUN_REPORT_OBJECT_PROC(v_report_id, vch_rep_srv, 'PDF', CACHE, v_report_file_name, v_report_other, '/reports/rwservlet') ;
--[v_report_id = report_object; vch_rep_srv = report server; v_report_other = parameter list]

RUN_REPORT_OBJECT_PROC is coded as

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;
vch_path varchar2(500);
-- v_job_appointee varchar2(100);
BEGIN

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);
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);

c_old :='@';

FOR i IN 1..LENGTH(report_otherparam) LOOP
c_new:= substr(report_otherparam,i,1);
-- v_job_appointee:=report_otherparam;


IF (c_new =' ') THEN
c:='&';
ELSE
c:= c_new;
END IF;
IF (c_old =' ' and c_new = ' ') THEN
null;
ELSE
v_report_other := v_report_other||c;
END IF;

c_old := c_new;
end loop;

-- message(v_report_other);
-- message(v_report_other);

hidden_action := hidden_action ||'&'|| v_report_other;
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);

IF rep_status='FINISHED' THEN
vjob_id :=substr(report_message,length(report_server_name)+2,length(report_message));
vch_path:=reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name;
WEB.SHOW_DOCUMENT(reports_servlet||'/getjobid'||vjob_id||'?server='||report_server_name,' _blank');
ELSE
null;
END IF;
END;
Previous Topic: Call procedure in oracle reports
Next Topic: Problem in PDF generated from Report server
Goto Forum:
  


Current Time: Fri Nov 22 19:30:19 CST 2019