Data editing > Writing out data > Writing to a report file
 
Writing to a report file
Quick reference
To write information to a report file, type:
report[n] file_name variable_names
variable_names is a comma-separated list of the variables and texts to print.
Use reportn rather than just report to start a new line each time the statement is executed.
More information
A report file is a special type of print file in which you can print out records, fields or variables in the format of your choice. To write information in a report file, use the report statement, as follows:
report filename parameters
filename is the name of the file to be written to.
parameters define exactly what is to be written.
Lines in a report may be up to 1024 characters long. Report does not start a new line automatically at the end of each write, but you can tell it to do so by following the keyword report with the letter n:
reportn filename parameters
In both cases, the named file must be identified as a report file using a filedef statement, as described in Defining the file type.
The parameter list defines what is to be printed in the report file. It may contain variables, texts, and special characters representing tabs and spaces.
See
Data variables
Integer variables
Real variables
Text and white space
Examples of report statements
See also
Writing out data