Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step tutorials and online videos.

Click Here To Learn More »

19.06 Exporting to PDF, RTF, and Word

Exporting to PDF, RTF, and Word Documents

The process for exporting to PDF, RTF, and MS Word shares the same classes for all three. In fact, the code is identical except for the property that sets the export format type, which specifies which of the three types to use.

Exporting a report to PDF, RTF or Word gives you the option to specify the page range. You can set the starting and ending page or simply print out the entire report. Note that all pages must be consecutively numbered. For example, you can’t export the first few pages of a report and the last few pages of a report. Table 19-4 shows the properties used for setting the page range.

Table 19-4. PdfRtfWordFormatOptions Properties.

Property Description
UsePageRang Boolean that enables/disables the use of page ranges
FirstPageNumbe The first page number to export
LastPageNumbe The last page number to export

The following listing first creates an ExportOptions object variable, myExportOptions, and tells it that the export file will be saved to a disk file using the DiskFileDestinationOptions object.

After that it sets the format type to PDF. If you want to export to RTF or Word, change this line to be the appropriate...

Get UNLIMITED Crystal Reports Online Training!

Click Here To Start Your Training!

1500+ Tutorial Pages

Complete Crystal Reports Online Training with over 1,500 pages of better than book quality Crystal Reports tutorials.

Step-by-step Online Videos

Learn at your own pace from the comfort of your home! Pause, rewind and watch online training videos anytime!

Online Community

Members-only community where you can post and answer questions. The community is checked on a regular basis by best selling Crystal Reports book author Brian Bischof to help answer your questions.

Cut & Paste Source Code

Save time with simple cut and paste source code you can use right now in your next report!

Click Here To Start Your Training!