Exporting data to a file

You may find it useful have a report that always prints to a file. For example, a list of customer names and addresses could be exported to a file for use with word processing software as a mailing list.

To export data to a file using the destination clause of the run report or run report with name statement, you must specify the file format to be used, as well as the name of the file. The file name must be enclosed in quotation marks. If the complete path (in generic format) for the file isn’t specified, the file will be saved in the current directory.

[spacer]

Format

Description

Text file

The report will be saved as text without any formatting. This option should be used when the application to which you’re converting the document is unable to read any of the other file formats.

Tab-delimited

This is the tab-separated ASCII character format used by programs such as Microsoft Excel®.

Comma-delimited

This is the standard comma-separated ASCII character format often used by database programs.

HTML

The report will be saved in HTML format to be viewed in a web browser.

XML

The report will be saved as an XML output file that contains a representation of the report layout and all of the report data.

PDF File

This format is available if you have the PDFWriter printer driver installed (included with Acrobat 5 and earlier), or Acrobat Distiller from Acrobat 6 or later. PDF (Portable Document Format) files can be read using the Acrobat Reader software available from Adobe.


If you will be using reports to export data to a tab-delimited or comma-delimited files, you must place fields in the report layout in a special way so the export file has the proper format. The fields to export must be placed in the body of the report, in the order they are to appear in the export file. The following illustration shows the layout of a report to export seller data from the Real Estate Sales Manager sample application.

[spacer]

You must also add the ExportOneLineBody=TRUE setting to the defaults file. This setting causes the items in the report body to be exported to a single line in the export file. The following illustration shows the output file when the report above is exported to a comma-delimited file.

[spacer]


Documentation Feedback