Once you have created your report, you can deploy it so that end users can view it. This section describes how to deploy a report with a paper layout (that is, REP, RDF, XML, or JSP report) and how to deploy a report with a Web layout (that is, a JSP report).
Note:
For an example on building and testing a JSP-based Web report, refer to the Oracle Reports Tutorial and the "Building a simple Parameter Form for a JSP-based Web report"
in the Oracle Reports Building Reports manual.
The following table describes which method you can use to deploy your report, depending on the type of report.
Table 18-3 Methods for Deploying a Report
Type of Report | Method | Reason for Using |
---|---|---|
Report with paper layout (REP, RDF, XML) |
Method for deploying a report with only a paper layout. |
|
JSP report with a paper layout |
Simplest method for deploying a paper report of any type. However, if the JSP report has both a paper and Web layout, we recommend you refer to Section 18.3.3, "Deploying a JSP Report to the Web and to Paper" |
|
JSP report with a paper and Web layout |
Strongly recommended for those who want to publish a report to both the Web and to paper. |
Note:
rwrun
and rwclient
execute the paper layout of your report. The report is processed and executed even though your JSP has only a paper layout. If your JSP has only a web layout but not a paper layout, running the JSP report using rwrun
or rwclient
obtains a blank output. If you have a JSP with paper layout, it is recommended that you save the JSP as RDF and then run the RDF using rwrun
or rwclient
.
Once you've created your paper report, you can deploy it to the Reports Server so that users can run the report. The steps in this section show you how to deploy a report of type RDF, REP, XML or JSP.
Note:
JSP reports can be deployed either to the Web or to paper, depending on the layout the report designer used for the JSP report. This section discusses how to deploy a JSP report with a paper layout. If you want to deploy a JSP report with a paper and Web layout, follow the steps in Section 18.3.3, "Deploying a JSP Report to the Web and to Paper".
If your report depends on Java classes (for example, Barcode classes, a Web Service stub, and so on), you must configure the process to access these classes. That is, if your JSP report with a paper layout contains a Java class, you must set the classPath
property of the engine element in the server configuration file (
$ORACLE_INSTANCE/config/ReportsServerComponent/server_name/rwserver.conf
for Standalone servers and $DOMAIN_HOME/config/fmwconfig/servers/<WLS_SERVER_NAME>/applications/reports_<version>/configuration/rwserver.conf
for In-process servers).
Transfer the report file ( RDF, REP, XML, or JSP) and its associated files (for example, PLL, PLX or referenced images) to the deployment directory on your application server.
Note:
To transfer the file, you can use any method available, such as FTP or WebDAV.
Ensure the directory on the application server where you've transferred the file is listed in the Reports Server access path. If it is not, use the REPORTS_PATH environment variable, or set the
sourceDir
property of the Reports engine element in the server configuration file.
Now that you have deployed your paper report, you can run it from a Web browser.
In a browser, for example, you can type the following URL in the Location
field:
http://your_web_server:port_num/reports/rwservlet?server=server_name&report= myreport.rdf&userid=username/password@my_db&desformat=pdf&destype=cache
In this example, your report displays in PDF format (desformat=PDF
) in the browser.
For more information on running a report from the browser, refer to Section 18.5, "Specifying a Report Request from a Web Browser".
There are two ways you can deploy your JSP reports: through the existing Oracle Reports application, or through a Java EE application you create yourself. Using an existing application is useful when you are developing and testing your JSP-based Web reports. When you are ready to deploy your reports, however, we recommend you use an application you've created yourself.
Note:
The easiest way to deploy JSP reports is to copy them to the following directory:
$DOMAIN_HOME\servers\WLS_REPORTS\tmp\_WL_user\reports_release\dir_name\war
The procedure described in this section for building your own EAR file and deploying it is only indicative; it is not comprehensive. For the detailed procedure, see Oracle Fusion Middleware Deploying Applications to Oracle WebLogic Server.
About JSP reports with both paper and Web layouts
With Oracle Reports Builder, you can create a JSP report with a paper layout, a Web layout, or both. You execute these reports using different processes:
JSP reports with paper layouts are executed through the Oracle Reports engine.
JSP reports with Web layouts are executed through the Java EE container.
If your report depends on Java classes (for example, Barcode classes, a Web Service stub, and so on), you must configure the process to access these classes. That is, if your JSP report with a paper layout contains a Java class, you must set the classPath
property of the engine element in the server configuration file (
$ORACLE_INSTANCE/config/ReportsServerComponent/server_name/rwserver.conf
for Standalone servers and $DOMAIN_HOME/config/fmwconfig/servers/<WLS_SERVER_NAME>/applications/reports_<version>/configuration/rwserver.conf
for In-process servers.)
If your JSP report with a Web layout contains a Java class, you can either add the classes or JAR to the WAR file, or change the Java EE container classpath
. For more information, refer to the Oracle Containers for Java EE documentation.
Note:
For an example on building a report with a paper and Web layout, see "Building a Report with a Barcode" in the Oracle Reports Building Reports manual. For a simple JSP-based Web report example, refer to the Oracle Reports Tutorial
.
The steps in this section show you how to deploy a JSP report with a paper and Web layout using a Java EE application. To deploy your JSP report with a paper and Web layout, you can create a new Oracle Reports Java EE application. You can create this application in an existing instance or a new instance of Oracle WebLogic Server.
In this section, you will create a new Java EE application for Oracle Reports. You will create a Web application archive (WAR file) that will contain the application information, then deploy it as an Enterprise archive (EAR file). To create a new Java EE application, you can use Oracle JDeveloper, another Java development tool, or you can create it manually. If you do not use Oracle JDeveloper to create the application, you must make a few modifications to the application, as well as to your JSP report.
To create a Java EE application:
Note:
If you are not familiar with creating a Java EE application, refer to Sun Microsystem's Web site (http://java.sun.com/javaee
). For more information on using Oracle JDeveloper, refer to the Oracle JDeveloper online Help.
Before you create your EAR file, ensure that your application contains all the necessary directories, such as WEB-INF
and the web.xml
file.
Note:
The WEB-INF
directory must contain the JSP tag library for Oracle Reports, called reports_tld.jar
. In Oracle Fusion Middleware, you can find the tag library here:
DOMAIN_HOME/servers/WLS_REPORTS/tmp/_WL_user/reports_version/random_string/war/WEB-INF/lib/reports_tld.jar
Ensure that your JSP-based Web report points to the location of the JSP tag library for Oracle Reports. Otherwise, the report will not run.
To point to the location of the JSP tag library, include the taglib
directive in the JSP file:
<%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
Create a new EAR file, either manually or using a tool such as Oracle JDeveloper. Ensure you create the WAR file according to the appropriate Java EE format.
If your JSP report contains a paper layout and you want to deploy your report to paper, open the web.xml
file.
Note:
On Oracle Fusion Middleware, the web.xml
file is located here:
DOMAIN_HOME/servers/WLS_REPORTS/tmp/_WL_user/reports_version/random_string/war/WEB-INF/lib/reports_tld.jar
If you are deploying a JSP report that only contains a Web layout, continue to Step 7.
Add the following code to the web.xml
file.
<servlet> <servlet-name>rwservlet</servlet-name> <servlet-class>oracle.reports.rwclient.RWClient</servlet-class> <load-on-startup>yes</load-on-startup> </servlet> <servlet-mapping> <servlet-name>rwservlet</servlet-name> <url-pattern>/rwservlet*</url-pattern> </servlet-mapping>
This new definition will redirect all URLs starting with /rwservlet
to the Oracle Reports Servlet you've defined.
Note:
You can change the Oracle Reports Servlet name and URL.
Save the web.xml
file.
Create an EAR file from the WAR file. Once these files are compiled, note where they are saved.
After you have created the WAR and EAR files, you can deploy them to the Oracle Fusion Middleware, which will serve the application to the Web. You can deploy these files using Oracle Enterprise Manager using either an existing WebLogic Server instance or a new WebLogic Server instance. For more information about deploying Java EE application in Oracle WebLogic Server, see Oracle Fusion Middleware Deploying Applications to Oracle WebLogic Server.
If your JSP report is a Web report, you can run your JSP-based Web report from a Web browser. In a browser, type the following URL in the Location field:
http://your_computer_name:port/MyReportApp/JSPreportname.jsp?userid=user ID/password@database_name
Note:
In the above URL, MyReportApp
is the name of the application you created.
If you wish you modify your JSP-based Web report at this point, you can either:
Replace the report in this location.
Re-create the WAR file with the modified JSP-based Web report, then redeploy the application. For more information, refer to Section 18.3.3.1, "Creating a New Java EE Application".
For more information on running a report from a browser, refer to Section 18.5, "Specifying a Report Request from a Web Browser".
If your JSP report has a paper layout, you can run your JSP report from a browser using the following URL:
http://your_web_server:portnum/MyReportApp/rwservlet?report=myreport.jsp&userid= username/password@my_db&server=server_name&desformat=pdf&destype=cache
In this example, your report displays as a PDF (desformat=PDF
) in the browser.
For more information on running a report from a browser, refer to Section 18.5, "Specifying a Report Request from a Web Browser".
There are no UNIX fonts built into the WE8MSWIN1252
character set. This may cause Oracle Reports to fail when NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
. Therefore, you must map the code page of the installed fonts (defined in the Tk2Motif.rgb
file) to the WE8MSWIN1252
character set. TK2Motif.rgb
is located in the ORACLE_INSTANCE/config/FRComponent/frcommon/guicommon/tk/admin
directory.
Note:
This mapping is required for Oracle Reports Builder, Reports Converter in non-batch mode (BATCH=NO
), Reports Server and Reports Runtime with REPORTS_DEFAULT_DISPLAY=NO
. Reports Server and Reports Runtime uses REPORTS_DEFAULT_DISPLAY
to determine the fonts needed.
Tk2Motif*fontMapCs: ISO8859-1=WE8MSWIN1252
(if there are ISO8859-1
fonts installed).