Using the Export Control to Deliver Reports in Other Formats

So far all the scenarios that have been discussed in this chapter have involved displaying reports in dynamic HTML format. Although this is a great report delivery method for most scenarios, there are times when reports need to be exported to various other file formats. Although this can be accomplished by using the ReportClientDocument object model, there is an easier way to do this: using the Export control.

Listing 32.10 shows how the Export control would be used to export a report to PDF. Notice that the Export control has the concept of the report source of the processHttpRequest method.

Listing 32.10. Exporting a Report via Code
 //Instantiate a ReportExportControl object ReportExportControl ...

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.