Breaking on Attribute Values

The BREAK-ON modifier divides an INFO/ACCESS report into sections, according to the data in the specified attributes. This modifier causes INFO/ACCESS to create a new section (indicated by three asterisks, or by any other specified text) whenever the data changes. For example, in a report that lists company personnel by department, each department might appear in a separate section.

The point at which a new section begins is called a control break. Up to 15 different control breaks may be specified in a single INFO/ACCESS query, and the highest level break is the first one specified.

Totals may also be included at the end of each section in the report. This feature is described later in this section.

Format

BREAK-ON attribute [" [text] ['options '] [text] "

Parameter(s)

attribute

Attribute upon whose changing data a new section begins. INFO/ACCESS determines the change by testing the first 24 characters of the data, from left to right.

Specified attribute is automatically included as one of the columns in the report.

text

Printed in the attribute column when a control break occurs. This text replaces the three asterisks that are output by default. Enclose the specified text in double quotes.

options

Affect the processing of the control break. These include:

B

Inserts data from the attribute specified in the report heading if the B option was used with the HEADING modifier. Use this option with only one BREAK-ON modifier per query.

D

Suppresses the break line data if only one new line was output since the last control break.

L

Suppresses the blank line preceding the break line. This option has no effect when specified with the U option.

P

Starts a new page after each control break.

R

Forces all data associated with a control break to appear on the same page.

U

Underlines all total fields for each control break.

V

Inserts the current data for the attribute into the text on the control break line.

Description

Enclose options in a set of single quotes, within the accompanying text (which is enclosed in a set of double quotes).

To generate a report about classes of children in a school, the following example shows the first page (section) of a report using the BREAK-ON modifier.

This query sorts the children’s names alphabetically and divides the report into alphabetical sections by the teacher’s last name. The listing for each teacher begins on a new page:

>SORT STUDENTS BY TEACHER BY NAME NAME BREAK-ON TEACHER " 'P' "

 

 

 

PAGE 1

 

 

 

 

 

STUDENTS..

Name..........................

Teacher

 

 

 

4504

HARMON, GEORGE

JONES

4505

PORTNOY, SYLVIA

JONES

4506

RATNER, HEIDI

JONES

4503

WATKINS, JOHN

JONES

4507

WELCONE, JIM

JONES

 

 

 

 

 

 

The following topics are also presented in this section:

Including Totals in a Control Break

Suppressing Detail Lines

See Also

Formatting INFO/ACCESS Reports

A Sample Report

Creating Headings and Footings

Calculating Totals in a Report

Special Uses of Formatting Modifiers