Implementing the Page Viewer

The first viewer component to be covered is the Page viewer, as illustrated in Listing 32.5. To use this viewer, you will create its CrystalReportViewer object. It, along with all the other viewers, exposes a method called setReportSource that accepts a valid report source object as obtained from the description in the previous section. Finally, again like the other viewers, it has a processHttpRequest method that accepts references to the current servlet context. This method does the actual rendering to HTML.

Listing 32.5. Viewing a Report over the Web
 //To create a Java report viewer you need to instantiate a CrystalReportViewer //object. To create a CrystalReportViewer object: CrystalReportPartsViewer viewer = ...

Get Special Edition Using® Crystal Reports® 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.