Home » Developer & Programmer » Forms » Calling Reports Using web.show_document() from Forms (10g)
Calling Reports Using web.show_document() from Forms [message #517968] Sat, 30 July 2011 05:23 Go to next message
shanie
Messages: 118
Registered: January 2011
Senior Member
Dear All,

From Form I attached and called the report by using web.show_document().It is working fine.
But I need to give parameter while running the report so that User can give run time value in that parameter.
Like some variable between start_date and end_date.

How can I give parameters to web.show_document so that they ask for values before running the report.

Please Help!

Thanks & Regards,
Shanie
Re: Calling Reports Using web.show_document() from Forms [message #517969 is a reply to message #517968] Sat, 30 July 2011 05:31 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
Please read this post hopefully it'll help you.

http://www.orafaq.com/forum/m/501128/81953/#msg_501128

Regards,
Irfan
Re: Calling Reports Using web.show_document() from Forms [message #517973 is a reply to message #517969] Sat, 30 July 2011 06:16 Go to previous messageGo to next message
shanie
Messages: 118
Registered: January 2011
Senior Member
Dear Sir,

Thanks for Instant reply.
Form is not compiled. It is giving errors like Bad Bind Variable.
My Report Query is
SELECT 	distinct SPRIDEN_ID,SPRIDEN_LAST_NAME ||' '||		SPRIDEN_FIRST_NAME||' '||SPRIDEN_MI  AS Fullname,
sprmbox_mailbox_no,sprmbox_mailbox_key
from saturn.spriden, saturn.sprmbox where  
SPRIDEN_ID = sprmbox_stu_id 
and sprmbox_status = 'A'
AND SATURN.SPRIDEN.SPRIDEN_CHANGE_IND IS NULL
and sprmbox_assign_date between :sdate and :edate;


I enter sdate and edate parameters in web.show_document() according to as you mention in your post.

But Form is not compiling It is giving Bad Bind Variable

Please Help!.

Regards,
Shanie
Re: Calling Reports Using web.show_document() from Forms [message #517976 is a reply to message #517973] Sat, 30 July 2011 07:59 Go to previous messageGo to next message
shanie
Messages: 118
Registered: January 2011
Senior Member
Code written to call Reports in Form
BEGIN
	
Declare
v_show_document	VARCHAR2 (2000) := '/reports/rwservlet?'
v_connect VARCHAR2(200) := 'useridname-test@test';
v_report_server	VARCHAR2 (50)   := 'server-name';
v_report_name varchar2(100):= '/TEST/reports/rdf/GZMAIL.rdf';
v_format VARCHAR2(12)    := 'HTMLCSS';	--PDF or SPREADSHEET
begin
v_show_document := v_show_document
		|| v_connect
		-- Report server
		|| '&server='
		|| v_report_server
		-- Report name
		|| '&report='||v_report_name
		-- Reports parameters
		|| '&destype=CACHE'
	        || '&desformat='||v_format
         || '&sdate='||:GZMAIL.sdate||'&edate='||:GZMAIL.edate;

	web.show_document(v_show_document);
	end;

END;


I dont know where I'm going wrong. The form is giving errors Bad Bind Variable :GZMAIL.sdate like this

Please I need Help!
Regards,
Shanie
Re: Calling Reports Using web.show_document() from Forms [message #517977 is a reply to message #517976] Sat, 30 July 2011 08:43 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
As my Understanding your code is correct.
Did you compile "all" (Ctrl + Shift + K)?
Check you Form parameters Or Rename it.


Regards,
Irfan
Re: Calling Reports Using web.show_document() from Forms [message #517996 is a reply to message #517977] Sun, 31 July 2011 00:15 Go to previous messageGo to next message
shanie
Messages: 118
Registered: January 2011
Senior Member
Compiling is done in Unix by the following command
frmcmp_batch.sh module = GZAMAIL.fmb userid = username/password

We didnt compile in Windows Environment.Even if we compile it will give us error in Windows.

Quote:
Check you Form parameters Or Rename it.

I didnt understand this which Form Parameters? I mean Report server or report name Parameters.

Please Help!
Regards,
Shanie
Re: Calling Reports Using web.show_document() from Forms [message #517998 is a reply to message #517996] Sun, 31 July 2011 01:17 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Quote:

I didnt understand this which Form Parameters? I mean Report server or report name Parameters.


I mean parameters which you passed in Report through Forms.

Regards,
Irfan
Re: Calling Reports Using web.show_document() from Forms [message #518001 is a reply to message #517998] Sun, 31 July 2011 01:33 Go to previous messageGo to next message
shanie
Messages: 118
Registered: January 2011
Senior Member
These are Report Parameters only(sdate & Edate).
They are not Form Parameters.
What I created in Report User Parameters that only I gave in Web.show_document.

I mean :GZMAIL.sdate(Reportname.userparametername)

I'm not passing Form Parameters as sdate and edate are not in Form.
They are created in Report

Regards,
Shanie
Re: Calling Reports Using web.show_document() from Forms [message #518005 is a reply to message #518001] Sun, 31 July 2011 02:53 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
Try this.

Declare
v_show_document	VARCHAR2 (2000) := '/reports/rwservlet?'
v_connect VARCHAR2(200) := 'useridname-test@test';
v_report_server	VARCHAR2 (50)   := 'server-name';
v_report_name varchar2(100):= '/TEST/reports/rdf/GZMAIL.rdf';
v_format VARCHAR2(12)    := 'HTMLCSS';	--PDF or SPREADSHEET
Begin

v_show_document := v_show_document
		|| v_connect
		-- Report server
		|| '&server='
		|| v_report_server
		-- Report name
		|| '&report='||v_report_name
		-- Reports parameters
		|| '&destype=CACHE'
	        || '&desformat='||v_format &paramform=Yes';

web.show_document(v_show_document,'_blank');

End;


For more detail pls read this documentation.
http://www.oracle.com/technetwork/developer-tools/forms/documentation/secure-webshowdoc-rep6i-133956.pdf

Regards,
Irfan
Re: Calling Reports Using web.show_document() from Forms [message #553724 is a reply to message #518005] Tue, 08 May 2012 03:10 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Hi irfan , my requirement is simple i just want to open the report directly as .pdf , presently its storing in a seperate path where i define in desformat.
Re: Calling Reports Using web.show_document() from Forms [message #553882 is a reply to message #553724] Wed, 09 May 2012 01:39 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
Define Desformat=pdf and then report'll directly open in acrobat reader pdf format.
Web.Show_Document('http://localhost:9002/reports/rwservlet?userid=nis/nis@abc&server=ReportsServer_asin&report=F:\xyz.rdf&destype=CACHE&desformat=pdf&paramform=no','_blank');



Hope it'll help you.

Regards,

Irfan
Re: Calling Reports Using web.show_document() from Forms [message #553895 is a reply to message #553882] Wed, 09 May 2012 02:33 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Thanks irfan , i did the same using desformat=pdf but still its not opening do you have a sample for running the reports from form.Do i need to give this command web.show as you have mentioned and i believe f: is the path were the .rdf is stored right.Is local host 9002 is common for all.

Re: Calling Reports Using web.show_document() from Forms [message #553896 is a reply to message #553895] Wed, 09 May 2012 02:48 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Dear,
I 've Forms / Reports 11g where this code working fine & report run in pdf format.
Localhost your computer name where forms & reports are installed.
Forms-URL: http://localhost:9001/forms/frmservlet
Reports-URL: http://localhost:9002/reports/rwservlet
Domain-Port: 7001
Homepage: http://localhost:7001/
WebLogic Server Administrator Console: http://localhost:7001/console
Enterprise Manager Console: http://localhost:7001/em
EM Agent URL: http://localhost:5155/emd/main



Regards,
Irfan

[Updated on: Wed, 09 May 2012 02:51]

Report message to a moderator

Re: Calling Reports Using web.show_document() from Forms [message #553898 is a reply to message #553896] Wed, 09 May 2012 02:58 Go to previous message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

we have only report 6i so what to do on that.should i go with web.show or runproduct and please give me the command appropriate to report 6i.
Previous Topic: Oracle Forms / Reports 10g on WIN 2003 64 bit server
Next Topic: DELETE_RECORD & CLEAR_RECORD
Goto Forum:
  


Current Time: Fri Jul 05 22:21:09 CDT 2024