BREAK.ON

BREAK.ON

Top  Previous  Next

 

The BREAK.ON field qualifier keyword causes the query processor to display the named field, generating a breakpoint whenever the field value changes.

 

 

Format

 

BREAK.ON  { "options" } field

 

where

 

optionscontrols the appearance of the breakpoint.

 

fieldis the field name or evaluated expression to be reported.

 

 

The BREAK.ON keyword appears before the field name and causes the query processor to generate a breakpoint whenever the field value changes. The field is also printed as part of the report. Queries using breakpoints should also sort on the breakpoint field(s).

 

The action taken at the breakpoint depends on the optional options component and whether any field value accumulations (AVERAGE, CALC, MAX, MIN, PERCENTAGE or TOTAL) are in use.

 

A breakpoint with no options and no field accumulations prints a line with two asterisks in the column for the field causing the breakpoint followed by a blank line. If field accumulations are present, subtotals are also printed for each accumulated column. A line of hyphens may appear above the subtotals depending on the use of the U breakpoint control code.

 

The options text will be used in place of the default two asterisks when a breakpoint occurs. This text may also contain control codes enclosed in single quotes. The available control codes are:

 

B{n}Start a new page, retaining the value of the breakpoint field for inclusion in the page heading/footing by use of the B heading text option. The optional single digit qualifier, n, allows collection of values from multiple breakpoints for inclusion in a composite heading. If omitted, the value of n defaults to zero. Thus use of B alone is equivalent to use of B0.
DOmit the subtotal line if there is only one line of detail for this breakpoint.
LEmit a blank line in place of the breakpoint. Any text in the options string will be ignored.
NResets page number to one at each breakpoint. This implies the P option if not used with B or P.
OOnly show the value of the breakpoint field on the first detail line within the breakpoint.
PStart a new page.
UIf the PICK.BREAKPOINT.U mode of the OPTION command is in effect, this mode inserts a line of hyphens above any subtotals, etc. If this option is not in effect, the line of hyphens is produced unless the U mode is used.
VPrint the breakpoint field value in place of the default two asterisks. The V control code can be embedded in text into which the value will be inserted.
XSave previous value of breakpoint field in @BPV.

Combinations of control codes may be used together.

 

 

Pick Syntax

 

If the PICK.BREAKPOINT mode of the OPTION command is in effect, the options element of the BREAK.ON appears after the field rather than before.

 

 

Examples

 

The command

 

LIST SALES BY REGION BREAK.ON REGION SALESMAN TOTAL ORDER.VALUE

 

might produce a display such as that below.

 

LIST SALES BY REGION BREAK.ON REGION SALESMAN TOTAL ORDER.VALUE       Page 1

SALES..... REGION  SALESMAN  ORDER VALUE

19887       North   Roberts        279.40

19859       North   Sharp          384.43

19858       North   Sharp          845.50

19845       North   Harris         234.53

           **                -----------

           North                 1743.86

 

19866       South   Abbott         465.31

19886       South   Abbott         397.23

19830       South   Smith          324.39

           **                -----------

           South                 1186.93

 

                             ===========

                                 2930.79

 

7 records listed.

 

 

For this same data, the command

 

LIST SALES BY REGION BREAK.ON "Total'O'" REGION SALESMAN TOTAL ORDER.VALUE

 

would produce

 

LIST SALES BY REGION BREAK.ON "Total"O"" REGION SALESMAN TOTAL ORDER.V  Page 1

SALES..... REGION  SALESMAN  ORDER VALUE

19887       North   Roberts        279.40

19859               Sharp          384.43

19858               Sharp          845.50

19845               Harris         234.53

           Total             -----------

           North                 1743.86

 

19866               Abbott         465.31

19886               Abbott         397.23

19830               Smith          324.39

           Total             -----------

           South                 1186.93

 

                             ===========

                                 2930.79

 

7 records listed.

 

 

See also:

BREAK.SUP