Implementing the Part Viewer

The Part viewer works much the same way as the Page viewer—in fact, much of the code is exactly the same, except for the type of viewer object that is created. Listing 32.6 assumes that the report to be displayed has an initial report part defined in the report itself.

Listing 32.6. Viewing a Report Using the Report Part Viewer
 //To create a Java report part viewer you need to instantiate a //CrystalReportPartsViewer object: CrystalReportPartsViewer viewer = new CrystalReportPartsViewer(); //Obtain a ReportSource object. Set the viewer's report source by calling its //setReportSource method viewer.setReportSource(reportSource); //After you have created and initialized a Java report part viewer, you //call its processHttpRequest ...

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.