Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step tutorials and online videos.

Click Here To Learn More »

19.03 Using Programming Code

Exporting with Programming Code

Using the built-in export feature of the Crystal Reports viewer is nice, but as in most things related to programming, what you get in ease of use you give up in functionality. To get the most functionality for exporting a report, you have to write the programming code yourself.

It is common to export a report and find out that either the parameters or login information is lost. This is because these parameters were set using the viewer object and the ReportDocument object is used to do the exporting. These objects are exclusive of each other. When exporting, always set all properties with the ReportDocument object.

Before exporting a report, you have to answer two questions. The first question is, what is the destination type. There are four destination types to choose from: Disk file, Exchange folder, Email attachment and an Http Response. The second question, what is the format that the report should be exported to. There are seven formats that reports can be converted to: PDF files, RTF, MS Word, MS Excel, MS Excel data only, HTML 3.2 and HTML 4.0. These two questions are independent of each other and are programmed differently. Figure 19-4 shows...

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!