DEFINE VIEW command

Used to define a new view or overwrite an existing view.

Syntax

DEFINE VIEW view_name <RLINES n> <ALL> <SUPPRESS> <SUMMARIZED>
<IF test> <WHILE test> <HEADER header_text> <FOOTER footer_text>
<TO report_file_name <HTML>> <OK>

Parameters

view_name

Specifies the name of the view to create or overwrite.

RLINES n

Optional. Specifies the line spacing for detail records in views and reports. By default, detail lines are single spaced.

ALL

Optional. Specifies that all fields in the active ACL table layout are added to the view.

SUPPRESS

Optional. Specifies that blank detail lines should be suppressed in reports generated from the view. When the report is generated the blank detail lines will be omitted from the output. This option applies to reports based on multiline views.

SUMMARIZED

Optional. Specifies that reports generated from the view should include subtotals and totals, but not include the detail lines. The subtotals are generated based on the break fields defined in the view. If this option is not selected, ACL produces a report that includes detail lines, as well as subtotals for each of the specified break fields.

IF test

Optional. Specifies a condition that must be met. The command is only executed on records that pass the test.

WHILE test

Optional. Specifies that the command should only be executed while a condition is true. The command processing terminates as soon as the specified test evaluates as false, or the end of the table is reached.

HEADER header_text

Optional. Specifies the text to insert at the top of each page of a report. The header_text value must be specified as a quoted string. The value overrides any value set for the ACL HEADER system variable.

FOOTER footer_text

Optional. Specifies the text to insert at the bottom of each page of a report. The footer_text value must be specified as a quoted string. The value overrides any value set for the ACL FOOTER system variable.

TO report_filename HTML

Optional. Specifies the filename and type for reports created from this view. The HTML keyword specifies that reports generated from this view will be saved as HTML files (.htm). By default, generated reports are output as ASCII text files.

OK

Optional. Specifies that if there is an existing view with the same name it will be overwritten without confirmation.

Example

The following example opens the “Ar” table and creates a view called AR_Report, which includes all of the fields in the table layout:

OPEN Ar
DEFINE VIEW AR_Report HEADER "AR Report" ALL OK
Related reference
DEFINE COLUMN command


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback