Breaks the body of a report into summary groups.
BREAK level expression \
[HEADING [orientation] reportitem \
[:format:] [WHERE Boolean Expression]] \
[FOOTING [orientation] reportitem [:format:] \
[WHERE Boolean Expression>]
|level||The break level number (an integer greater than or equal to zero).
In the hierarchy of breaks, the higher the level number, the more minor the break. (For example, a level 1 break also triggers breaks at level 2, level 3, and so on.)
|expression||Any valid value expression. When the value of this expression changes, a break occurs at the associated level and any lower levels.|
|HEADING||Introduces the “heading clause” for the break level, which can consist of a break orientation statement, or a number of report items and their format instructions, or both. The footing displays each time the break level is triggered.|
|FOOTING||Introduces the “footing clause” for the break level, which can consist of a break orientation statement, or a number of report items and their format instructions, or both. The heading displays each time the break level is triggered.|
|orientation||Orientation can be FORMAT ACROSS (the default) or FORMAT DOWN.
Used only in column-oriented reports.
The break heading and break footing can differ in orientation.
|reportitem||Any valid expression that yields a value for display in the break heading or break footing. The heading and footing can each display a series of reportitems. Each item has its own associated format.|
|format||A set of instructions defining the format for the associated reportitem. Format is enclosed in : (colons) and can consist of any valid combination of format options.|
|Boolean expression||Specify multiple conditional break headings and footings for any break. The multiple HEADING or FOOTING specifications are separated from one another by commas.
The multiple headings and footings specify alternative formatting specifications for the BREAK that occurs when the value of Boolean expression changes. As with conditional detail lines, the first heading or footing specification whose WHERE clause is TRUE is the one that is formatted for this particular occurrence of the break. WHERE clauses in break footings can include aggregate functions that are calculated over all records since the last occurrence of this break.
|FORMAT ACROSS||The break heading or footing displays in a column whose width, if not preset, is determined by the width of the component report items.|
|FORMAT DOWN||The break heading or footing starts on a new line and displays horizontally across the page, thus breaking the report horizontally at that point.|
Breaks can be organized into the hierarchy: 0, 1, 2, and so on. The higher the level number, the more minor the break.
Each change in the value of expression triggers a break at the associated level. The break levels below it in the hierarchy are also triggered; that is, a level 1 break triggers a level 2 break, and a level 3 break, and so on.
The report items in the break heading can include individual data values only from the first member of the current group.
The report items in the break footing can include individual data values only from the last member of the current group. However, summary data computed over all members of the group can be displayed in the footing. Use aggregate functions.
Each time the break level is triggered, headings specified in a corresponding COLUMN BREAK command, DETAIL LINE command, and PAGE HEADING command are also displayed.
Note: Multiple HEADING or FOOTING specifications are separated from one another by commas.
This is an example of a conditional footing:
break 2 OrderNo
‘**Large Order’ $total(Amount) WHERE $total(Amount) > 10000, ‘ ‘ $total(Amount)