Calling parameter report from form [message #380764] |
Tue, 13 January 2009 04:47 |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi !
I have a parameter based report, which i want to call from form through a push button..
I used the coding ,
Declare
repid REPORT_OBJECT;
v_rep VARCHAR2(1000);
rep_status VARCHAR2(20);
BEGIN
repid := find_report_object('REPORT120');
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_DESFORMAT,'HTMLCSS');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'PF_1='||:EMP_LL.employeeid||' paramform=yes');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'servername');
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://<server>:<port>/reports/rwservlet/showjobs?server=servername' ||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=servername','_blank');
ELSE
message('Error when running report');
END IF;
END;
Now the report is getting opened, where i need to enter employeeid in a textbox..
As soon as i type some id value and click submit, that same page(enter a value for empid:textbox, submit and cancel buttons) is getting loaded again and not the report of corresponding employeeid ..
The screen opened as report is of the format,
enter a value for empid -- Text Box
submitbutton cancelbutton
please help !
Thanks and Regards,
varosh
|
|
|
|
Re: Calling parameter report from form [message #383796 is a reply to message #382134] |
Fri, 30 January 2009 04:59 |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi All !
I also tried with the coding,
DECLARE
report_id Report_Object;
v_report_other VARCHAR2(4000);
BEGIN
/* Call run_report_object */
report_id:= find_report_object('REPORT121');
v_report_other:= 'paramform=yes P_1='||:blockname.employeeid;
RUN_REPORT_OBJECT(report_id,
:parameter.rwserver,
'HTMLCSS',
CACHE,
'filename.jsp',
v_report_other,
'/reports/rwservlet');
END;
But this gives me the error,
bad bind variable:parameter.rwserver
I will be thankful , if anyone could give me a solution for this..
Thanks and Regards,
varosh
[Updated on: Fri, 30 January 2009 05:00] Report message to a moderator
|
|
|