BREAK LEVEL
BREAK LEVEL ( level {; pageBreak} )
Parameter | Type | Description | |
---|---|---|---|
level | Integer | → | Number of break levels |
pageBreak | Integer | → | Break level for which to do a page break |
Description
BREAK LEVEL specifies the number of break levels in a report performed using PRINT SELECTION.
You must execute BREAK LEVEL and ACCUMULATE before every report for which you want to do break processing. These commands activate break processing for a report. See the explanation for the Subtotal command.
The level parameter indicates the deepest level for which you want to perform break processing. You must have sorted the records with at least that many levels. If you have sorted more levels, those levels will be printed as sorted, but will not be processed for breaks.
Each break level that is generated will print the corresponding Break areas and Header areas in the form. There should be at least as many Break areas in the form as the number you pass in level. If there are more Break areas, they will be ignored and will not be printed.
The second, optional, argument, pageBreak, is used to cause page breaks during printing.
Example
The following example prints a report with two break levels. The selection is sorted on four levels, but the BREAK LEVEL command specifies to break on only two levels. One field is accumulated with the ACCUMULATE command:
ORDER BY([Emp]Dept;>;[Emp]Title;>;[Emp]Last;>;[Emp]First;>) // Sort on four levels
BREAK LEVEL(2) // Turn on break processing to 2 levels (Dept and Title)
ACCUMULATE([Emp]Salary) // Accumulate the salaries
FORM SET OUTPUT([Emp];"Dept salary") // Select the report form
PRINT SELECTION([Emp]) // Print the report
See also
ACCUMULATE
ORDER BY
PRINT SELECTION
Subtotal
Properties
Command number | 302 |
Thread safe | ✗ |