Set export format

Command group Flag affected Reversible Execute on client Platform(s)
Report parameters NO NO NO All

Syntax

Set export format {export-format}

Export Formats

Delimited (commas)
Delimited (tabs)
One field per line
Omnis data transfer
Delimited (user delimiter)

Description

This command specifies the export format to be used with the current report. The Set export format command lets you to override the parameters stored in the report class. You should use it after selecting a report class.

If you leave the name empty, the report is printed without an export format. An error occurs if the name is not a valid export format name. The name specified for the command can contain square bracket notation.

Translation

Export format names are not tokenized and therefore are not understood by foreign language versions of Omnis. To avoid this portability problem, you can always build a list of export formats and use the list to select a format (see the second Example below).

Example

; Ouput report rMyReport to a comma delemited file
Send to file
Set report name rMyReport
Set print or export file name {[con(sys(115),'output.txt')]}
Set export format {Delimited (commas)}
Print report
Close print or export file
; Set the export format to the second in the list iExportFormatList
Set current list iExportFormatList
Do iExportFormatList.$define(iExportFormat)
Build export format list
Do iExportFormatList.$line.$assign(2) ;; Delimited (tabs)
Do iExportFormatList.$loadcols()
Set export format {[iExportFormat]}