If you want the export to focus on keeping the report layout intact, this is referred to as page-based. If you want to export raw data for analysis, this is called record-based. Let’s look at which export formats are page-based and which are record-based.
Table 15-1. Export formats
Format | Page or Record | File Extension |
---|---|---|
Adobe Acrobat PDF | Page | |
Crystal Reports | Page | .RPT |
HTML 3.2/4.0 | Page | .HTML |
MS Excel | Page | .XLS |
MS Excel – Data only | Record | .XLS |
MS Word | Page | .RTF |
MS Word – Editable/RTF | Page | .RTF |
ODBC | Record | n/a |
Record Style | Record | .REC |
Separated Values – CSV | Record | .CSV |
Tab Separated | Record | .TTX |
Text | Record | .TXT |
XML | Record | .XML |
Note: Cross-tabs are not supported in CSV
Exporting reports is fairly easy and it’s a nearly identical process for each format type. To export a report, select the menu options File > Export > Export Report. This opens the dialog box in Figure 15-1.
Figure 15-1. Export dialog box.
The first dropdown box lets you choose a format type. The different types are listed in table 15-1 and we’ll talk about each in detail in the following sections. The second dropdown box lets you choose the destination. Most of the time you will probably export it to a disk file. However, you can also export it to an application or as an attachment to an email. If you export it to an application, it saves the report as a temporary file and then automatically opens the file with the chosen application. It uses the file extension to determine which application to open it with. For example, if you export to an .XLS file, then Excel is opened and the export file is automatically loaded. If you save it with a .TXT extension, then Notepad is opened and loads the export file.
Once the application is opened, you can work with it to make changes and do analysis. Just remember to save the file yourself when you are finished because Crystal Reports only saved it to a temporary file and that file is gone after you close the application.
If you choose to export the report as an email attachment, it creates the file and opens the Send Mail dialog box that prompts you for the recipient’s email address and the subject and message information.
After selecting the export format type on the dialog box, click the OK button. A second dialog box appears that prompts you to enter export options. We’ll learn about the export options in the next section. After entering the options, click the OK button to export the file.
If you find yourself entering the same options for a particular format type, you can set default values that will be used each time. By selecting the menu items File > Export > Report Export Options, you can open the export options dialog box and set the properties you use most often. The next time you export a report, these settings will already be made and you can simply click the OK button to export the file. Of course, you still have the option of making changes to the dialog box if you want to temporarily override the default values you set earlier.
Each export format type uses a different options dialog box because each has a different list of requirements. While there are similarities between all the dialog boxes (e.g. choosing the page range), each dialog box has unique features and needs to be explained independently.
The following is a list of the different format types that Crystal Reports exports to.
- Adobe Acrobat PDF
- Crystal Reports
- HTML
- MS Excel 97-2000
- MS Excel 97-2000 Data Only
- MS Word / Editable RTF
- ODBC Databases
- Record Style
- Separated Values
- Tab Separated Text
- Text
- Report Definition
- XML
Let’s look at the details of each format type and see how they affect the export output.