Running Report Requests
8.1 The Reports URL Syntax
Running Report Requests
This chapter discusses various ways to send report requests to the Reports Server. It includes the following sections:
The Reports URL Syntax
Report Request Methods
Publishing a Report Portlet in Oracle9iAS Portal
Specifying a Report Request from a Web Browser
Sending a Request to the URL Engine
Scheduling Reports to Run Automatically
Reusing Report Output from Cache
Using a Key Map File
8.1 The Reports URL Syntax
This section provides quick reference information on formulating a URL for publishing a report. It covers three deployment types:
Servlet
JSP
CGI(for backward compatibility only)
The information is largely the same for both Windows and UNIX environments.
Differences are noted.
8.1.1 Servlet
The syntax for the URL of a report run via the Reports Servlet is:
http://<web_server>.<domain_name>:<port>/<alias>/rwservlet?<parameters>
Table 8–1lists and describes the components of the servlet URL.
The URL that calls the Reports Servlet could look like this:
http://neptune.world.com:80/reports/rwservlet?keyname
Keyname refers to a command line listed under a unique header (the key name) in the cgicmd.dat file. Note that this works differently for JSP files, which use the keyword/value paircmdkey=valueto specify key names for command lines that are stored in the cgicmd.dat file. You'll find more information about using key mapping inSection 8.9, "Using a Key Map File".
Using the servlet does not mean that you cannot also use Reports JSP files, if the JSP files contain both Web and paper layouts. When you run the report, specify the servlet in the URL and call the JSP with the command line argument:
report=<myreport>.jsp.
For example:
http://neptune.world.com:80/reports/rwservlet?report=myreport.jsp&destype=cache&
desformat=html
Table 8–1 Components of a URL that calls the Reports Servlet
Component Description
<web_server> The name you gave the Oracle HTTP Server when you installed it.
<domain_name> Your organization's domain name.
<port> The port number on which the Oracle HTTP Server listens for requests. When no port is specified, the default is used (80).
<alias> The virtual path that stands in for the absolute path to the files a URL will access.
rwservlet Invokes the Oracle9iAS Reports Services servlet.
? Identifies the beginning of the command line arguments.
<parameters> All the command line arguments, or the key to the key map file where command line arguments are specified.
You'll find more information about command lines inAppendix A, "Command Line Arguments".
8.1.2 JSP
The syntax for a JSP-based report URL is:
http://<web_server>.<domain_name>:<port>/<alias>/myreport.jsp?<parameters>
Table 8–2lists and describes the components of the JSP-based report URL.
The URL used to invoke a JSP-based report could look like this:
http://neptune.world.com:80/jsp/myreport.jsp?
You can specify a key in the URL that refers to a command line in the cgicmd.dat file that contains additional command line parameters. In this case, you must use the name value pair:cmdkey=keyname. This can appear anywhere in your URL, provided it follows the start of the query string (marked by a question mark). For example:
http://neptune.world.com:80/jsp/myreport.jsp?userid=scott/tiger@hrdb&cmdkey=key1 Note: Yo can also supply these parameters within the JSP file
itself.
Table 8–2 Components of a JSP-based report URL
Component Description
<web_server> The name you gave the Oracle HTTP Server when you installed it.
<domain_name> Your organization's domain name.
<port> The port number on which the Oracle HTTP Server listens for requests. When no port is specified, the default is used (80).
<alias> The virtual path that stands in for the absolute path to the files a URL will access.
myreport.jsp The report *.jsp file you want this URL to execute.
? Identifies the beginning of the command line arguments.
<parameters> All the command line arguments, and/or the key to the key map file where command line arguments are specified.
In your URL, use an ampersand (&) with no spaces to string parameters together.
Using a JSP does not mean that you cannot also use the Reports Servlet. When you run the report, specify the servlet in the URL and call the JSP with the command line argument:report=<myreport>.jsp.
For example:
http://neptune.world.com:80/reports/rwservlet?report=myreport.jsp&destype=cache&
desformat=html
You'll find more information about command line keywords inAppendix A,
"Command Line Arguments". You'll find more information about the cgicmd.dat file inSection 8.9, "Using a Key Map File". For information on choosing whether to use the Reports Servlet to run JSP reports, refer toChapter 1, "Oracle9iAS Reports Services Architecture".
8.1.3 CGI
The syntax for the URL of a report run via the Reports CGI on Windows is:
http://<web_server>.<domain_name>:<port>/<alias>/rwcgi.exe?<parameters>
And on UNIX is:
http://<web_server>.<domain_name>:<port>/<alias>/rwcgi.sh?<parameters>
Table 8–3lists and describes the components of a CGI-based report URL.
Note: The Reports CGI is included in Oracle9iAS Reports Services for backward compatibility. We strongly recommend that you deploy your reports with either a servlet or JSP implementation.
Table 8–3 Components of a URL that calls the Reports CGI
Component Description
<web_server> The name you gave the Oracle HTTP Server when you installed it.
<domain_name> Your organization's domain name.
<port> The port number on which the Oracle HTTP Server listens for requests. When no port is specified, the default is used (80).
The URL used to invoke a CGI implementation could look like this on Windows:
http://neptune.world.com:80/CGI-BIN/rwcgi.exe?key2
And like this on UNIX:
http://neptune.world.com:80/CGI-BIN/rwcgi.sh?key2
If Reports Services is installed on a UNIX machine, use ".sh" in lieu of ".exe". For example:
http://neptune.world.com:80/CGI-BIN/rwcgi/sh?key2