18.3 Deploying Your Reports

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)

Deploying a Report with a Paper Layout

Method for deploying a report with only a paper layout.

JSP report with a paper layout

Deploying a 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

Deploying a JSP Report to the Web and to Paper

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.

18.3.1 Deploying a Report with a Paper Layout

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).

To deploy your paper report:

  1. 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.
  2. 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.

18.3.2 Running a Report with a Paper Layout

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".

18.3.3 Deploying a JSP Report to the Web and to Paper

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.

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.

18.3.3.1 Creating a New Java EE Application

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.
  1. 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:

    $FMW_HOME/user_projects/domains/<domain_name>/servers/WLS_REPORTS/stage/reports/reports/web.war/WEB-INF/lib/reports_tld.jar

  2. 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" %>
    
  3. 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.

  4. 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:

    $FMW_HOME/user_projects/domains/<domain_name>/servers/WLS_REPORTS/stage/reports/reports/web.war/WEB-INF/lib/reports_tld.jar

    If you are deploying a JSP report that only contains a Web layout, continue to Step 7.

  5. 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.
  6. Save the web.xml file.

  7. Create an EAR file from the WAR file. Once these files are compiled, note where they are saved.

18.3.3.2 Deploying Java EE Application Using WebLogic Server

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.

18.3.4 Running a JSP-Based Web Report from a Browser

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:

For more information on running a report from a browser, refer to Section 18.5, "Specifying a Report Request from a Web Browser".

18.3.5 Running a JSP report with a Paper Layout

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".

18.3.6 Running with the WE8MSWIN1252 Character Set on UNIX

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.

Example1

Tk2Motif*fontMapCs: ISO8859-1=WE8MSWIN1252 (if there are ISO8859-1 fonts installed).