Prerequisites for This Example Create a Query and the Layout

28-4 Oracle Reports Users Guide to Building Reports Figure 28–2 Paper Design view of the Time Series Calculations report 20. To view the data model you just created using the Report Wizard, click the Data Model button in the toolbar. The same data model can be used for both your paper and your JSP-based Web reports. Your data model should look something like this: Figure 28–3 Data Model view of the Time series Calculations report

21. Save your report as timeseries_your_initials.rdf.

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. Building a Time Series Calculations Report 28-5 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=OraCellNumberrw:field id=F_total src=total nullValue=nbsp; F_ total rw:fieldtd 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=OraCellNumberrw:field id=F_total src=total formatMask=LNNNGNN0D00 nullValue=nbsp; F_total rw:fieldtd

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=OraCellNumberrw:field id=F_mavg src=mavg formatMask=LNNNGNN0D00 nullValue=nbsp; F_mavg rw:fieldtd 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: The bold text is the new format mask tag that we have added to the Total field. 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. 28-6 Oracle Reports Users Guide to Building Reports 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.

28.4 Summary

Congratulations You have successfully created a time series calculations report for both paper and Web. You now know how to: ■ create a time series calculations report definition. ■ modify your report for the Web. For more information on any of the wizards, views, or properties used in this example, refer to the Oracle Reports online Help, which is available in Oracle Reports Builder or hosted on the Oracle Technology Network OTN, as described in Section 4.1.1, Using the Oracle Reports online Help . 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.comtechnologyproductsreports 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 .