Previous Page | Next Page

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

Creating a Column for Each Value of a Variable


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

Tasks Option
Specify the color of the break lines in the REPORT window COLOR=
Specify the link text used in the Table of Contents CONTENTS=
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*
* Traditional SAS monospace output only.


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 affects output in the interactive report window environment only.

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

CONTENTS='link-text'

specifies the text for the entries in the HTML contents file or PDF table of contents for the output that is produced by PROC REPORT. If the PAGE= option and the CONTENTS= option with link-text is specified, PROC REPORT uses the value of link-text as a link for tables created in the Table of Contents.

For information about HTML and PDF output, see Output Delivery System.

Default: If a BREAK BEFORE statement is present and the PAGE option is specified but no CONTENTS= option is specified, the default link text will be the location variable plus the value of the location variable. The location variable is associated with the BREAK variable. The value is the BREAK variable value. As shown in the following code, the value is rep and the location is before rep.
break before rep / summarize page;

If the BREAK AFTER statement does not have a CONTENTS= option specified, but does have the PAGE option specified, the default link text in the TOC is "Table N" where N is an integer.

Restriction: For HTML output, the CONTENTS= option has no effect in the HTML body file. It affects only the HTML contents file.
Restriction: If CONTENTS= is specified, but no PAGE option is specified, PROC REPORT generates a warning message in the SAS Log file.
Interaction: If the DEFINE statement has a page option and there is a BREAK BEFORE statement with a PAGE option and the CONTENTS= option has a value other than empty quotes specified, PROC REPORT adds a directory to the TOC and puts links to the tables in that directory. See the CONTENTS= option in the DEFINE statement for more information about this interaction.
Interaction: If there is a BREAK BEFORE statement specified and a CONTENTS=' ' option and a PAGE= option specified, PROC REPORT does not create a directory in the TOC. Instead, PROC REPORT uses the CONTENTS= value from the DEFINE statement to create links to the TOC. If there is no CONTENTS= option in the DEFINE statement, PROC REPORT creates links using the default text described in the DEFINE statement. Refer to the DEFINE Statement CONTENTS= option for an explanation of the default text information. .
Interaction: For RTF output, the CONTENTS= option has no effect on the RTF body file unless you turn on the CONTENTS=YES option in the ODS RTF statement. In that case, a Table of Contents page is inserted at the front of your RTF output file. Your CONTENTS= option text from PROC REPORT will then show up in this separate Table of Contents page.
Tip: If the CONTENTS= option is specified where the value is empty quotation marks, no table link will be created in the Table of Contents. An example of this code is
CONTENTS=' '
Tip: If there are multiple BREAK BEFORE statements, the link text is the concatenation of all of the CONTENTS= values or of all the default values.
DOL

(for double overlining) uses the 13th formatting character to overline each value

  • that appears in the summary line

  • that would appear in the summary line if you specified the SUMMARIZE option.

Default: equal sign (=)
Restriction: This option has no effect on ODS destinations other than traditional SAS monospace output.
Interaction: If you specify both the OL and DOL options, then PROC REPORT honors only OL.
See also: the discussion of FORMCHAR=.
DUL

(for double underlining) uses the 13th formatting character to underline each value

  • that appears in the summary line

  • that would appear in the summary line if you specified the SUMMARIZE option.

Default: equal sign (=)
Restriction: This option has no effect on ODS destinations other than traditional SAS monospace output.
Interaction: If you specify both the UL and DUL options, then PROC REPORT honors only UL.
See also: the discussion of FORMCHAR=.
OL

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

  • that appears in the summary line

  • that would appear in the summary line if you specified the SUMMARIZE option.

Default: hyphen (-)
Restriction: This option has no effect on ODS destinations other than traditional SAS monospace output.
Interaction: If you specify both the OL and DOL options, then 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

in monospace output, starts a new page. In HTML and PRINTER destinations, the PAGE option starts a new table.

Restriction In the OUTPUT destination, this option has no effect.
Interaction: If you use PAGE in the BREAK statement and you create a break at the end of the report, then 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 ODS destinations other than traditional SAS monospace 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<location(s)>=<style-element-name><[style-attribute-specification(s)]>

specifies the style element to use for default summary lines that are created with the BREAK statement. See Using Style Elements in PROC REPORT for details.

Restriction: This option affects only the HTML, RTF, and Printer output.
Tip: FONT names that contain characters other than letters or underscores must be enclosed by quotation marks.
SUMMARIZE

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

  • the break variable (which you can suppress with the SUPPRESS option)

  • other group or order variables to the left of the break variable

  • statistics

  • analysis variables

  • computed variables.

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

Report Item Value
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, then 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

  • the value of the break variable in the summary line

  • any underlining and overlining in the break lines in the column that contains the break variable.

Interaction: If you use SUPPRESS, then 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 that is 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

  • that appears in the summary line

  • that would appear in the summary line if you specified the SUMMARIZE option.

Default: hyphen (-)
Restriction: This option has no effect on ODS destinations other than traditional SAS monospace output.
Interaction: If you specify both the UL and DUL options, then 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, then customized break lines appear after underlining or double underlining. For more information about customized break lines, see COMPUTE Statement and LINE Statement.  [cautionend]

Previous Page | Next Page | Top of Page