• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

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 method to launch it in a Web browser.
viewer.processHttpRequest(request, response, getServletContext(), null);


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint