28.3 Modify the Web Source of Your JSP Report

Now that you have created your paper report layout, you can take the same report and generate a JSP-based Web report that looks the same as your paper report.

To modify your JSP-based Web report:

  1. Save your report, timeseries_your_initials.rdf as a JSP under the same name (timeseries_your_initials.jsp).

  2. Click the Web Source button in the toolbar to display the Web Source view.

    In the Web Source, you need to change the format mask to match that of the paper report.

  3. In the Web Source view, find the text:

    <td <rw:headers id="HFtotal" src="HBtotal, HBcustid, HFcustid"/>
    class="OraCellNumber"><rw:field id="F_total" src="total" nullValue="&nbsp;"> F_
    total </rw:field></td>
    
  4. Add the tag formatMask="LNNNGNN0D00" to the line, so that the line looks like this:

    <td <rw:headers id="HFtotal" src="HBtotal, HBcustid, HFcustid"/>
    class="OraCellNumber"><rw:field id="F_total" src="total"
    formatMask="LNNNGNN0D00" nullValue="&nbsp;"> F_total </rw:field></td>
    

    Note:

    The bold text is the new format mask tag that we have added to the Total field.
  5. Change the format mask for the MAVG field. The resulting line in the Web Source should look like this:

    <td <rw:headers id="HFmavg" src="HBmavg, HBcustid, HFcustid"/>
    class="OraCellNumber"><rw:field id="F_mavg" src="mavg" formatMask="LNNNGNN0D00"
    nullValue="&nbsp;"> F_mavg </rw:field></td>
    
  6. Save your report as a JSP.

  7. Click the Run Web Layout button in the toolbar to display your new JSP-based Web report in your browser. The report should look something like this:

    Note:

    If Netscape 7.0 is your default browser, and the browser does not display, set the registry key HKEY_CURRENT_USERS\Software\Oracle\Toolkit\Tkbrowser to the default browser location. Ensure that the BrowserName and the BrowserPath keys reflect the correct values. For example: BrowserName=Netscape 7; BrowserPath=C:\Program Files\Netscape\Netscape\Netscp.exe.

    Figure 28-4 Time Series Calculations JSP-based Web Report

    Description of Figure 28-4 follows
    Description of "Figure 28-4 Time Series Calculations JSP-based Web Report"

    The report displays the total for each customer, as well as the average over the past four months.

    Note:

    For information on creating a Parameter Form for a JSP-based Web report, refer to the documented example on the Oracle Technology Network (OTN): on the Oracle Reports page (http://www.oracle.com/technology/products/reports/index.html), click Getting Started to display the Getting Started with Oracle Reports home page. In the list of topic sections on the left, click Index. In the Collateral Type list, choose Examples, and click Search. In the list of examples that displays, click Building a JSP-based Web Report with a Parameter Form.