Chapter Contents

Previous

Next
The REPORT Procedure

BREAK Statement


Produces a default summary at a break (a change in the value of a group or order variable). The information in a summary applies to a set of observations. The observations share a unique combination of values for the break variable and all other group or order variables to the left of the break variable in the report.

Featured in: Consolidating Multiple Observations into One Row of a Report and Creating a Column for Each Value of a Variable .


BREAK location break-variable</ option(s)>;

To do this Use this option
Specify the color of the break lines in the REPORT window COLOR=
Double overline each value DOL
Double underline each value DUL
Overline each value OL
Start a new page after the last break line PAGE
Write a blank line for the last break line SKIP
Specify a style element for default summary lines, customized summary lines or both STYLE=
Write a summary line in each group of break lines SUMMARIZE
Suppress the printing of the value of the break variable in the summary line and of any underlining or overlining in the break lines in the column containing the break variable SUPPRESS
Underline each value UL


Required Arguments

location
controls the placement of the break lines and is either

AFTER
places the break lines immediately after the last row of each set of rows that have the same value for the break variable.

BEFORE
places the break lines immediately before the first row of each set of rows that have the same value for the break variable.

break-variable
is a group or order variable. The REPORT procedure writes break lines each time the value of this variable changes.


Options

COLOR=color
specifies the color of the break lines in the REPORT window. You can use the following colors:

BLACK MAGENTA
BLUE ORANGE
BROWN PINK
CYAN RED
GRAY WHITE
GREEN YELLOW

Default: The color of Foreground in the SASCOLOR window. (For more information, see the online help for the SASCOLOR window.)
Restriction: This option has no effect on the HTML or Printer output.

Note:   Not all operating environments and devices support all colors, and on some operating systems and devices, one color may map to another color. For example, if the DEFINITION window displays the word BROWN in yellow characters, selecting BROWN results in a yellow item.  [cautionend]

DOL
(for double overlining) uses the thirteenth formatting character to overline each value

Default: equals sign (=)
Restriction: This option has no effect on the HTML or Printer output.
Interaction: If you specify both the OL and DOL options, PROC REPORT honors only OL.
See also: the discussion of FORMCHAR= .

DUL
(for double underlining) uses the thirteenth formatting character to underline each value

Default: equals sign (=)
Restriction: This option has no effect on the HTML or Printer output.
Interaction: If you specify both the UL and DUL options, PROC REPORT honors only UL.
See also: the discussion of FORMCHAR= .

OL
(for overlining) uses the second formatting character to overline each value

Default: hyphen (-)
Restriction: This option has no effect on the HTML or Printer output.
Interaction: If you specify both the OL and DOL options, PROC REPORT honors only OL.
See also: the discussion of FORMCHAR= .
Featured in: Ordering the Rows in a Report and Writing a Customized Summary on Each Page

PAGE
starts a new page after the last break line.
Interaction: If you use PAGE in the BREAK statement and you create a break at the end of the report, the summary for the whole report appears on a separate page.
Featured in: Writing a Customized Summary on Each Page

SKIP
writes a blank line for the last break line.
Restriction: This option has no effect on the HTML or Printer output.
Featured in: Ordering the Rows in a Report , Consolidating Multiple Observations into One Row of a Report , Creating a Column for Each Value of a Variable , and Condensing a Report into Multiple Panels

STYLE=<style-element-name><[style-attribute-specification(s)]>
specifies the style element to use for default summary lines that are created with the BREAK statement. You can alter the default style element of the summary lines or specify another style element entirely.

Note:   You can use braces ({ and }) instead of square brackets ([ and ]).  [cautionend]

style-element-name
is the name of a style element that is part of a style definition that is registered with the Output Delivery System. SAS Institute provides some styles definitions. Users can create their own style definitions with PROC TEMPLATE.
Default: If you do not specify a style element, PROC REPORT uses DataEmphasis.
See also: For information about Institute-supplied style definitions, see What Style Definitions Are Shipped with the Software? .

For information about PROC TEMPLATE and the Output Delivery System, see The Complete Guide to the SAS Output Delivery System.

style-attribute-specification
describes the style attribute to change. Each style-attribute-specification has this general form:
style-attribute-name=style-attribute-value

You can set these attributes:

ASIS= FONT_WIDTH=
BACKGROUND= HREFTARGET=
BACKGROUNDIMAGE= HTMLCLASS=
BORDERCOLOR= JUST=
BORDERCOLORDARK= NOBREAKSPACE=
BORDERCOLORLIGHT= POSTHTML=
BORDERWIDTH= POSTIMAGE=
CELLHEIGHT= POSTTEXT=
CELLWIDTH= PREHTML=
FLYOVER= PREIMAGE=
FONT= PRETEXT=
FONT_FACE= PROTECTSPECIALCHARS=
FONT_SIZE= TAGATTR=
FONT_STYLE= URL=
FONT_WEIGHT= VJUST=

For information about style attributes, see What Style Attributes Can Base Procedures Specify? .

Restriction: This option affects only the HTML and Printer output.

SUMMARIZE
writes a summary line in each group of break lines. A summary line for a set of observations contains values for

The following table shows how PROC REPORT calculates the value for each kind of report item in a summary line created by the BREAK statement:

If the report item is ... Then its value is ...
the break variable the current value of the variable (or a missing value if you use SUPPRESS)
a group or order variable to the left of the break variable the current value of the variable
a group or order variable to the right of the break variable, or a display variable anywhere in the report missing*
a statistic the value of the statistic over all observations in the set
an analysis variable the value of the statistic specified as the usage option in the item's definition. PROC REPORT calculates the value of the statistic over all observations in the set. The default usage is SUM.
a computed variable the results of the calculations based on the code in the corresponding compute block (see COMPUTE Statement ).
* If you reference a variable with a missing value in a customized summary line, PROC REPORT displays that variable as a blank (for character variables) or a period (for numeric variables).

Note:   PROC REPORT cannot create groups in a report that contains order or display variables.  [cautionend]
Featured in: Ordering the Rows in a Report , Consolidating Multiple Observations into One Row of a Report , and Writing a Customized Summary on Each Page

SUPPRESS
suppresses printing of

Interaction: If you use SUPPRESS, the value of the break variable is unavailable for use in customized break lines unless you assign a value to it in the compute block associated with the break (see
COMPUTE Statement ).
Featured in: Consolidating Multiple Observations into One Row of a Report

UL
(for underlining) uses the second formatting character to underline each value

Default: hyphen (-)
Restriction: This option has no effect on the HTML or Printer output.
Interaction: If you specify both the UL and DUL options, PROC REPORT honors only UL.
See also: the discussion of FORMCHAR= .


Order of Break Lines
When a default summary contains more than one break line, the order in which the break lines appear is

  1. overlining or double overlining (OL or DOL)

  2. summary line (SUMMARIZE)

  3. underlining or double underlining (UL or DUL)

  4. skipped line (SKIP)

  5. page break (PAGE).

Note:    If you define a customized summary for the break, customized break lines appear after underlining or double underlining. For more information about customized break lines, see COMPUTE Statement and LINE Statement .  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.