Declare an exclusion or selection condition for a reportΒΆ

!exclude

Declare an exclusion condition

!select

Declare a selection condition


SYNTAX

!exclude if condition
!select if condition

Exclude or select records for which the specified condition is true. Any number of !exclude and !select declarations are permitted. If a program contains both !exclude and !select declarations, then the order in which they are defined in the program code is a vital factor in record selection.

The selection and exclusion of records from the driving file works as follows:

1

If the program contains no !exclude or !select declarations, all records are selected.

2

If the program contains exclusion conditions but no selection conditions, then records for which any exclusion condition is true are excluded. All other records are selected.

3

If the program contains selection conditions but no exclusion conditions, then records for which any selection condition is true are selected. All other records are excluded.

4

If the program contains both !exclude and !select declarations, then the conditions are tested in the order in which they are defined in the program code. The first condition which is found to be true determines whether the record is selected or excluded. If no condition is true, the record is excluded.


NOTES

  • The special functions total, min, max and average, and the Sculptor system variable sys.RecordCount, do not include records which are excluded. The !auto declaration can be used to perform counts, calculations and totalling on all records in the driving file, regardless of selection criteria.


EXAMPLES

!exclude if (Stock.num = 0) or (Stock.cat = "X")
!exclude if (Purch.daterec < (sys_Date - 30))
!select if (Acc.category = "B") or (Acc.code bw "SP")

RELATED TOPICS

Reports