30.3 Modify the Web Source of Your JSP Report

Now that you have created your paper report layout, you will now learn how to 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, aggregatereport_your_initials.rdf as a JSP under the same name (aggregatereport_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 column titles to match those of the paper report.

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

    <th <rw:id id="HBbottom" asArray="no"/> class="OraColumnHeader"> Bottom </th>
    

    Tip:

    Choose Edit > Find and Replace, then type "bottom" in the Find what text box.
  4. Change the column header to "Salary" so that the line now looks like this:

    <th <rw:id id="HBbottom" asArray="no"/> class="OraColumnHeader"> Salary </th>
    
  5. The next line of code indicates the header for the "Top" column. Delete the header text so that the line looks like this:

    <th <rw:id id="HBtop" asArray="no"/> class="OraColumnHeader">  </th>
    
  6. Change the other two columns for Ename and Deptno as desired. For example, we changed them to "Name" and "Dept", like so:

    <th <rw:id id="HBename" asArray="no"/> class="OraColumnHeader"> Name </th>
    <th <rw:id id="HBdeptno" asArray="no"/> class="OraColumnHeader"> Dept </th>
    
  7. Save your report as a JSP.

  8. Click the Run Web Layout button in the toolbar to display your new JSP-based Web Report in your browser.

    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.

    The report should look something like this:

    Figure 30-7 Aggregating Data JSP-based Web Report

    Description of Figure 30-7 follows
    Description of "Figure 30-7 Aggregating Data JSP-based Web Report"

    The report displays, in Web format, the aggregate data you specified. Here, you can see which employees fall into the specified salary ranges.

    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.