NEW-REPORT

Syntax

NEW-REPORT {report_filename_txt_lit|_var|_col}

Description

Closes the current report output file and opens a new one with the specified file name.

This command is normally used with single reports only. When used with multiple report declarations, this command affects the current report only.

The internal page counter is reset to 1 when NEW-REPORT is executed.

Note:

SQR does not create a report output file until the first page is completed. NEW-REPORT might not create a new file, for example, if no data is selected and nothing is printed on the page.

Parameters

Parameter Description

{report_filename_txt_lit | _var | _col}

Specifies a new file name.

Example

The following example shows the NEW-REPORT command:

new-report  'rep2a.lis'
new-report  $next-file

Assign the report file name within an SQR report by issuing the NEW-REPORT command before printing. You might even prompt for the file name to use, as shown in the following example:

begin-report
  input  $file  'Enter report file name'
  new-report  $file
  ...

After execution of this command, the reserved variable $sqr-report is updated to reflect the new report name.

See DECLARE-REPORT, USE-REPORT

See The -F command-line flag