Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

19.02 Export with the Viewer

Exporting with the Viewer

The easiest way to export a report is to have the users do it themselves by using the report viewer. The viewer has a built-in export button that lets the user export the current report to the file format of their choice.



Figure 19-1. The Export button on the Windows Report Viewer toolbar.

When the user clicks on the export button, the Export Report dialog box appears. The user selects the file format and enters the filename. When the OK button is clicked the report gets exported to the file. There is nothing for you as a programmer to do.

The formats that you can export to are Crystal Reports (a standard .rpt file), Adobe Acrobat PDF, MS Excel, MS Excel Data Only, MS Word, and Rich Text Format.

The Export button does not support exporting to HTML.



Figure 19-2. The Windows Export Report dialog box.

When exporting from a web page, a pop-up window appears with the export options in it. Exporting from the web lets you export to the same file types as Windows, but it also lets you specify the pages. The Windows export doesn’t let you specify a page range and it always exports all report pages. Figure 19-3 shows the web export dialog box.



Figure 19-3. The web export page.