web.show_document parameter passing to Report9i [message #333692] |
Mon, 14 July 2008 03:16 |
Zahid Rahim
Messages: 31 Registered: April 2002
|
Member |
|
|
From my form with a single button i need to display a report with a paramter. Report is displaying fine but the parameter is not getting passed. I did the following behined my button i add this code:
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
plid ParamList;
vParamValue number := 20;
BEGIN
plid := Get_parameter_List('tmpdata');
IF NOT Id_Null(plid) THEN
Destroy_parameter_List( plid );
END IF;
plid := Create_parameter_List('tmpdata');
Add_parameter(plid,'P_CCD',TEXT_parameter,vParamValue);
Add_parameter(plid, 'PARAMFORM', TEXT_parameter, 'NO');
repid := FIND_REPORT_OBJECT('REPORT10');
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
/*Display report in the browser*/
WEB.SHOW_DOCUMENT('http://zahid-ocp:8888/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90&P_CCD='||:TXTPARAM||'¶mform=no','_blank');
ELSE
message('Error when running report');
END IF;
PAUSE;
END;
-------------------------------------------------------------------------
The Report has a query
select * from gl_coa
where coa_credit_days = :p_ccd
with a User Parameter P_CCD
If i remove the where condition the whole table data start appearing in the report but adding where condition is not accepting 20 as i send from the FORM Button. And the report with blank data appeared with column headings.
please help me as soon as possible
[Updated on: Mon, 14 July 2008 04:20] Report message to a moderator
|
|
|
|
|
|
|
|