How to send ParameterList into WEB.SHOW_DOCUMENT() [message #354447] |
Sun, 19 October 2008 03:45 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
Dear All,
How to pass parameter list to WEB.SHOW_DOCUMENT command? My following codes run fine without passing parameter. But, I require to pass the parameterlist with the command, Please Help.
QUOTE
plid := Get_Parameter_List(pl_name);
WEB.SHOW_DOCUMENT('/reports/rwservlet?destype=CACHE&desformat=PDF&report='||:GLOBAL.REPORTDIR||'\report1.rdf&userid='||:G LOBAL.CONNECTSTR);
UNQUOTE
Is there any way to pass parameter like below:
WEB.SHOW_DOCUMENT('/reports/rwservlet?destype=CACHE&desformat=PDF&report='||:GLOBAL.REPORTDIR||'\report1.rdf&userid='||:G LOBAL.CONNECTSTR||'¶meter=plid');
How can I attach plid parameterlist to the above command? Please help me!!!
GHossain
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #354559 is a reply to message #354447] |
Mon, 20 October 2008 05:24 |
vikasg2006
Messages: 80 Registered: March 2006 Location: Dubai
|
Member |
|
|
are you able to run report? . what abut report server. u have not mention in list. parameter we can pass, but are u able to run report without parameter. It won't give any error? like bind to report server failed or unable to connect to report server. you are talking abut 10g or 10i Form/reports
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #354592 is a reply to message #354559] |
Mon, 20 October 2008 08:32 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
Yes I can run the report withour passing parameter. To run the code I did not require to specify the report server name.
But, I need to pass some information from form to report through parameterlist. Hence, I need to know how I can attach parameter name or Parameterlist ID with the WEB.SHOW_DOCUMENT() command.
DECLARE
plname VARCHAR2(100):='empinfo);
plid PARAMETERLIST;
BEGIN
plid := Get_Parameter_List(pl_name);
WEB.SHOW_DOCUMENT('/reports/rwservlet? destype=CACHE&desformat=PDF&report='||:GLOBAL.REPORTDIR||'\report1.rdf&userid='||:G LOBAL.CONNECTSTR);
--Plz show me how I can attache plid WITH above command WEB.SHOW_DOCUMENT()
END;
Thanks for your reply.
[Updated on: Mon, 20 October 2008 08:43] Report message to a moderator
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #354599 is a reply to message #354592] |
Mon, 20 October 2008 09:01 |
|
saadatahmad
Messages: 452 Registered: March 2005 Location: Germany/Paderborn
|
Senior Member |
|
|
hi,
If I have to write the code to run the report, I would like to write it in this way
declare
v_show_document VARCHAR2 (2000) := '/reports/rwservlet?';
v_connect VARCHAR2 (200) := 'userid=username/password@connect_string';
v_report_server VARCHAR2 (30) := 'report_server_name';
v_report_name VARCHAR2(100) := 'my_report';
v_format VARCHAR2(12) := 'PDF'; -- 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
|| '¶mform=no'
|| '&p_my_first_parameter='||:block.my_first_parameter --Parameter Passed to report
|| '&p_my_second_parameter='||:block.my_second_parameter --Parameter Passed to report
;
web.show_document(v_show_document)
end;
p_my_second_parameter and p_my_second_parameter are the parameters which are passed to report. You can pass you parameters in this way
regards,
Saadat Ahmad [EDITED by DJM: fixed too long line]
[Updated on: Sun, 02 November 2008 22:56] by Moderator Report message to a moderator
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #354603 is a reply to message #354599] |
Mon, 20 October 2008 09:25 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
Dear Sadaat Bhai,
Thank you very much for your reply. Shukran. Your suggestion is great.
1. Specifying report servername is very difficult for me because I dont know what my running server name is. How can I know what my currently running report server name is.
2. Desformat SPREADSHEET is also not supporting, how can I make it to support SPREADSHEET format. Error Message: REP-826: Invalid printer driver 'SPREADSHEET' specified by parameter DESFORMAT.
Thank you once again.
Mohd. G. Hossain
[Updated on: Mon, 20 October 2008 09:33] Report message to a moderator
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #354605 is a reply to message #354603] |
Mon, 20 October 2008 09:46 |
|
saadatahmad
Messages: 452 Registered: March 2005 Location: Germany/Paderborn
|
Senior Member |
|
|
hi,
How you are running the report?
Are you uisng Application Server or you installed Developer on your machine and running the report there?
If you are on Application Server, you can find the report server name easily from enterprise manager. If you still couldn't find then you can open the report server with any name you want. No matter you want to run the report in your machine or from application server.
In both cases, Open command prompt and go to the BIN directory where your Developer or Oracle Application Middle Tier (In case of Application Server) is installed. and write this command.
F:\DevSuiteHome_1\BIN>rwserver server=rep60server start
F:\DevSuiteHome_1\BIN is the path on my machine.
In this case rep60server is the name of your report server. You can give other name also.
for your question 2: which version of forms your are using?
regards,
Saadat Ahmad
[Updated on: Mon, 20 October 2008 09:54] Report message to a moderator
|
|
|
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #354832 is a reply to message #354605] |
Tue, 21 October 2008 08:46 |
ranjith_amrita
Messages: 44 Registered: August 2008 Location: Coimbatore
|
Member |
|
|
Hi...
I want to generate report by getting input from the user. I am able to run a report by using your above code. There I've already created a report1.rdf file and I am able to run it.
My application will run like this. User will select some processes. He should enter the actual and target price for each process.
Eg:-
Process Name.........Actual Cost.........Target Cost
Process 1...............10..................9......
Process 2...............100................85......
Process 3...............120................115......
I want to use this information and generate one report.
Can u please help me???
I want to generate Graph also using this information. How to do that? I am very much struggling in this.
|
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #355035 is a reply to message #354840] |
Wed, 22 October 2008 05:54 |
|
WEB.SHOW_DOCUMENT('/reports/rwservlet?destype=CACHE&desformat=PDF&report='||:GLOBAL.REPORTDIR
||'\report1.rdf&userid='||:G LOBAL.CONNECTSTR);
You dont need to specify a report server for this.. do exactly as Sadaat has said in his post without specifying the resport server.
Search for CLIENT_OLE2 for Spreadsheets... [EDITED by DJM: split too long line]
[Updated on: Sun, 02 November 2008 22:56] by Moderator Report message to a moderator
|
|
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #356628 is a reply to message #356227] |
Fri, 31 October 2008 10:14 |
ranjith_amrita
Messages: 44 Registered: August 2008 Location: Coimbatore
|
Member |
|
|
Sir,
Suppose, if I am having 5 text boxes, I want to send all these values to the report. I know about the lexical parameter. Its goes like this (I got from this forum)
----------------------------------------------------
select empno, ename, job, sal, deptno
from emp
where deptno = &p_deptno
----------------------------------------------------
but when I am giving this to report its showing error. Instead of that &p_deptno, if I am giving :p_deptno, it is accepting. but it will take only one value.
Now, my doubt is how to send the five text box values as a group?
Ranjith
|
|
|
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #357229 is a reply to message #356977] |
Tue, 04 November 2008 06:15 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
Dear Sadat Bhai,
Can you please help me a little bit more about report server name?
I am running Oracle 11g Database with Developer Suite 10g release1,
My Web.Show_document() command works fine in LAN. But, when I try to print from the same form but from the web page it does not work. Perhaps if I mention report servername it will work, as I guess.
RWSERVER REP10G START command shows error message "Please consult the installation guides for how to setup and run this program"
How can I do that? I dont know the name of my existing report_server_name.
Please help me in detail.
I REMEMBER YOUR CODE THAT WORK VERY FINE IN LAN:
QUOTE
declare
v_show_document VARCHAR2 (2000) := '/reports/rwservlet?';
v_connect VARCHAR2 (200) := 'userid=username/password@connect_string';
v_report_server VARCHAR2 (30) := 'report_server_name';
v_report_name VARCHAR2(100) := 'my_report';
v_format VARCHAR2(12) := 'PDF'; -- 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
|| '¶mform=no'
|| '&p_my_first_parameter='||:block.my_first_parameter --Parameter Passed to report
|| '&p_my_second_parameter='||:block.my_second_parameter --Parameter Passed to report
;
web.show_document(v_show_document)
end;
UNQUOTE
Mohd. Golam Hossain
[Updated on: Tue, 04 November 2008 06:25] Report message to a moderator
|
|
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #357258 is a reply to message #357243] |
Tue, 04 November 2008 08:33 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
Dear Saadat Bhai,
I have the code lising below:
C:\rwserver server=REP10G START
(OracleAS Reports Services Box Appears: Report Server is ready)
DECLARE
xxxx
BEGIN
:GLOBAL.rwservlet :='/reports/rwservlet?';
:GLOBAL.destype :='&destype=' ||'CACHE';
:GLOBAL.desformat :='&desformat=' ||'PDF';
:GLOBAL.userid :='&userid=' ||:GLOBAL.CONNECTSTR;
:GLOBAL.company_info:=
'¤t_company_code=' ||:global.current_company_code||
'¤t_company_name=' ||:global.current_company_name||
'¤t_company_address='||:global.current_company_address||
'¤t_user_name=' ||:global.current_user_name
;
:GLOBAL.report_name:='&report=' ||:GLOBAL.REPORTDIR||'\invoice.rdf';
:GLOBAL.other_info:=
'&SERVER=' ||'REP10G'|| ----PROBLEM IS HERE
'&PARAMFORM=' ||'NO'||
'&PAGESIZE=' ||'8.5X11'||
'&ORIENTATION=' ||'PORTRAIT'||
'&COPIES=' ||:BUTTONS_BLOCK.COPIES||
'&MEMONO=' ||:invoicedocdtl_usr.docid||
'&MRVNO=' ||mrvno_var||
'&JVNO=' ||jvno_var
;
WEB.SHOW_DOCUMENT
(
:GLOBAL.rwservlet ||
:GLOBAL.destype ||
:GLOBAL.desformat ||
:GLOBAL.userid ||
:GLOBAL.company_info||
:GLOBAL.other_info ||
:GLOBAL.report_name
,'_blank'
);
END;
The above code runs my report neither in LAN nor in Web.
If I omit '&SERVER='||'REP10G'|| clause then my report runs in LAN, but do not run from Web.
Please tell what to do.
Best Regards-
Mohd. Golam Hossain
[Updated on: Tue, 04 November 2008 09:02] Report message to a moderator
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #357273 is a reply to message #357258] |
Tue, 04 November 2008 09:30 |
|
saadatahmad
Messages: 452 Registered: March 2005 Location: Germany/Paderborn
|
Senior Member |
|
|
well, I didn't understand actually what you mean by LAN or on the WEB. By LAN do you mean that you are running the report from Application Server (which is on LAN)?
And by web you mean that you are running the report on your local machine, not from Application Server, using a web browser (IE or fiefox)?
What I understood is that you have an Application Server installed on another machine and the report server is running there. So when you run the report from Application server it's running properly, but when you run the report from your local machine not from the Application Server, it's not running.
Am I right or not? If not the explain complete scenario.
Hint : Did you run the OC4J instance in case you are running the report on your machine locally? If not then run it and then try again.
regards,
Saadat Ahmad
[Updated on: Tue, 04 November 2008 09:32] Report message to a moderator
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #357336 is a reply to message #357273] |
Wed, 05 November 2008 00:02 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
1. My OC4J is running fine. (I ran it from E:\Oracle\Dev\10g\j2ee\DevSuite\startinst.bat, my oracle home is so),
2. I meant:
a. LAN=Local Area Network (Can be accessible through Internet Explorer from Networked Computers within my office)
b. WAN = Wide Area Network (From rest of the world outside my office network through Internet Explorer)
3. I have been using Oracle Database 11g and Developer Suite 10g Release1 for last 6 months.
4. I use the following command to print report:
web.show_document('/reports/rwservlet?destype=CACHE&desformat=PDF&report=c:\Payroll\ReportsI\invoice.rdf')
Problem-1: Above command prints from LAN, but does not print from WAN (The form is running well both in LAN and WAN):
The above printing command would print report from my LAN Computers by running forms through internet explorer (IE). But, the same command in the same form would not print report when I ran the form from Internet (outside of my office) by internet explorer. From Web/Internet/WAN I could run the form but the form did not print report.
Problem-2: After Re-Installation of database and DS the above command is not printing from LAN also, neither from WAN (The form is running well both in LAN and WAN):
I have re-installed Oracle Database 11g and Developer Suite 10g Release 1, few days ago. After re-installation of Oracle Database 11g and Developer Suite 10g the form is running well both in LAN and WAN. But, the above command is not printing neither from LAN nor from WAN.
Please help me with code listing about:
1. Why the report was running from LAN and not from WAN
2. Why the report is not running Neither in LAN nor from WAN after re-installation of Database and DS.
Best Regards-
Mohd. Golam Hossain
|
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #358148 is a reply to message #358084] |
Sun, 09 November 2008 07:30 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
Dear Saadat Ahmad Bhai,
Thank you very much for your kind reply.
Since, I can run the program from internet I can access the computer from internet. The program is running well but only print command is not functioning. My firewall is off. Other network settings are also ok. The web.show_document() command is not functioning.
Thank you again.
M. Golam Hossain
[Updated on: Sun, 09 November 2008 08:32] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: How to send ParameterList into WEB.SHOW_DOCUMENT() [message #360042 is a reply to message #359941] |
Wed, 19 November 2008 05:48 |
m_golam_hossain
Messages: 89 Registered: August 2008 Location: Uttara, Dhaka, Bangladesh
|
Member |
|
|
Dear Mr. David,
The following combination worked well:
--------------------------------------
Database Server:
Windows 2003 Server+Oracle Database 11g
Application Server:
Windows XP+Oracle Developer Suite 11g
To find out the problem:
------------------------
I have tried multiple factors like:
* RIP (Real IP) setting, Routing, etc.,
* Firewall setting,
* Access Protection of Antivirus,
* Re-installation of Acrobat Writer,
* Re-Installation of:
Oracle Database in Database Server and
Oracle Developer Suite in Application Server
* At last, change of Operating Systems in both Database Server and Application Server
* Disable of Core Multiplex - in the BIOS of Application Server Computer to test with old version of Windows-XP
My wrong combinations were:
---------------------------
Database Server:
Windows XP SP2/SP3+Oracle Database 11g
Application Server:
Windows XP SP2/SP3+Oracle Developer Suite 11g
Thanking you with best regards-
Mohd. Golam Hossain
|
|
|