Passing a query from a form to a report on web [message #85477] |
Thu, 01 July 2004 03:02 |
Lia
Messages: 3 Registered: July 2003
|
Junior Member |
|
|
Hi,
I'm using Web.show_document() to call an Oracle Report on the Web.(I use Oracle 8i and Forms6i)
I need to pass the query that the reports is based on as a parameter. (I build that query dynamically into the form)
How can I do this on the web?
Thanks very much,
Lia
|
|
|
Re: Passing a query from a form to a report on web [message #85496 is a reply to message #85477] |
Fri, 02 July 2004 04:31 |
Himanshu
Messages: 457 Registered: December 2001
|
Senior Member |
|
|
Hi,
It is somewhat similar what you do in client server environment.
L_qry_where := translate(L_Qry_Where, ' ','~');
L_rep_string := :Global.Server_Name||':'||:Global.Port||:Global.CGI_Dir||:Global.CGI_Exec||
'?server='||:Global.Report_Server||'&report=ALSR5020.rdf&userid='||
:Global.User_Name||'/'||:Global.User_Pwd||'@'||:Global.Database_Name||
'&P_Report_Name=ALSR5020&P_Query='||L_Qry_Where||'&P_Ordby='||L_Qry_Order_By||
'&Desformat='||:Global.Dest_Format||'&Orientation=LANDSCAPE&Destype='||:Global.Dest_Type||
'&P_Report_Title='||:Global.Report_Title||'&Desname='||:Global.dest_name;
Web.Show_Document(l_rep_string);
In the above mentioned code &P_Query is a lexical parameter in my report.
Make sure that you have replaced all the spaces in the where clause build by your form with "~" as I have done in the start of code using TRANSLATE function, otherwise your report will not run.
Also modify your Report and add code in Before-parameter-form of your report to convert "~" back to spaces.
HTH
Regards
Himanshu
|
|
|
|