Home » Developer & Programmer » Forms » web.show_document parameter passing to Report9i (Oracle 9i Forms/Reprots)
web.show_document parameter passing to Report9i [message #333692] Mon, 14 July 2008 03:16 Go to next message
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||'&paramform=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 Sad

[Updated on: Mon, 14 July 2008 04:20]

Report message to a moderator

Re: web.show_document parameter passing to Report9i [message #333780 is a reply to message #333692] Mon, 14 July 2008 07:42 Go to previous messageGo to next message
mandeepmandy
Messages: 79
Registered: May 2008
Location: USA
Member

Please refer the document on this link.I think this should solve your problem.

www.oracle.com/technology/products/forms/pdf/10g/frmrepparamform.pdf
Re: web.show_document parameter passing to Report9i [message #333966 is a reply to message #333692] Tue, 15 July 2008 01:16 Go to previous messageGo to next message
Zahid Rahim
Messages: 31
Registered: April 2002
Member
i read the whole document but problem did not get resolved Sad
Re: web.show_document parameter passing to Report9i [message #334072 is a reply to message #333966] Tue, 15 July 2008 06:49 Go to previous messageGo to next message
mandeepmandy
Messages: 79
Registered: May 2008
Location: USA
Member

1. If you are using param=no then just pass the parameter list with RUN_REPORT_OBJECT like

report_message:= run_report_object(report_id,paramlist);
My code is working with this.

2.If you are using param=yes then you have to use methode with 'pfaction'.You can use code present in the document.
Re: web.show_document parameter passing to Report9i [message #488721 is a reply to message #334072] Mon, 10 January 2011 13:04 Go to previous messageGo to next message
yaseenghaffar
Messages: 3
Registered: December 2010
Location: Karachi
Junior Member

I want report show with parameter I don't want to pass parameter from form I want user put parameter value.
Re: web.show_document parameter passing to Report9i [message #488722 is a reply to message #488721] Mon, 10 January 2011 13:06 Go to previous message
yaseenghaffar
Messages: 3
Registered: December 2010
Location: Karachi
Junior Member

I don't use para=no
Previous Topic: GO_BLOCK after insertion
Next Topic: Execute_query problem
Goto Forum:
  


Current Time: Sat Nov 09 13:52:59 CST 2024