Overview (REPORT command)

REPORT produces case listings and summary statistics and gives you considerable control over the appearance of the output. REPORT calculates all the univariate statistics available in DESCRIPTIVES and the statistics and subpopulation means available in MEANS. In addition, REPORT calculates statistics not directly available in any other procedure, such as computations involving aggregated statistics.

REPORT provides complete report format defaults but also lets you customize a variety of table elements, including column widths, titles, footnotes, and spacing. Because REPORT is so flexible and the output has so many components, it is often efficient to preview report output using a small number of cases until you find the format that best suits your needs.

Basic specification

The basic specification depends on whether you want a listing report or a summary report. A listing report without subgroup classification requires FORMAT and VARIABLES. A listing report with subgroup classification requires FORMAT, VARIABLES, and BREAK. A summary report requires VARIABLES, BREAK, and SUMMARY.

Listing reports. FORMAT=LIST and VARIABLES with a variable list are required. Case listings are displayed for each variable named on VARIABLES. There are no break groups or summary statistics unless BREAK or SUMMARY is specified.

Summary reports. VARIABLES, BREAK, and SUMMARY are required. The report is organized according to the values of the variable named on BREAK. The variable named on BREAK must be named on a preceding SORT CASES command. Specified statistics are computed for the variables specified on VARIABLES for each subgroup defined by the break variables.

Subcommand order

The following order must be observed among subcommands when they are used:

  • FORMAT must precede all other subcommands.
  • VARIABLES must precede BREAK.
  • OUTFILE must precede BREAK.
  • Each SUMMARY subcommand must immediately follow its associated BREAK. Multiple SUMMARY subcommands associated with the same BREAK must be specified consecutively.
  • TITLE and FOOTNOTE can appear anywhere after FORMAT except between BREAK and SUMMARY.
  • MISSING must follow VARIABLES and precede the first BREAK.
  • STRING must precede VARIABLES.

Syntax rules

  • Only one each of the FORMAT, STRING, VARIABLES, and MISSING subcommands is allowed.
  • To obtain multiple break groups, use multiple BREAK subcommands.
  • To obtain multiple summaries for a break level, specify multiple SUMMARY subcommands for the associated BREAK.
  • Keywords on REPORT subcommands have default specifications that are in effect if the keyword is not specified. Specify keywords only when you wish to change a default.
  • Keywords are enclosed in parentheses if the subcommand takes variable names as arguments.

Operations

  • REPORT processes cases sequentially. When the value of a break variable changes, REPORT displays a statistical summary for cases processed since the last set of summary statistics was displayed. Thus, the file must be sorted in order on the break variable or variables.
  • The maximum width and page length of the report are determined by the SET command.
  • If a column is not wide enough to display numeric values, REPORT first rounds decimal digits, then converts to scientific notation if possible, and then displays asterisks. String variables that are wider than the column are truncated.
  • The format used to display values in case listings is controlled by the dictionary format of the variable. Each statistical function in REPORT has a default format.

Limitations

  • Maximum 500 variables per VARIABLES subcommand. You can specify more than 500 variables if you stack them. See the topic VARIABLES subcommand (REPORT command) for more information.
  • Maximum 10 dummy variables per VARIABLES subcommand.
  • Maximum 20 MODE and MEDIAN requests per SUMMARY subcommand.
  • Maximum 20 PGT, PLT, and PIN requests per SUMMARY subcommand.
  • Maximum 50 strings per STRING subcommand.
  • The length of titles and footnotes cannot exceed the report width.
  • The length of string variables created on STRING cannot exceed the page width.
  • There is no fixed limit on the number of BREAK and SUMMARY subcommands. However, the page width limits the number of variables that can be displayed and thereby limits the number of break variables.
  • The maximum width of a report is 255 characters.
  • The number of report variables that can be specified depends upon the width of the report, the width of the variable columns, and the number of BREAK subcommands.
  • Maximum 50 variables for the FREQUENCY or PERCENT functions.
  • Memory requirements significantly increase if FREQUENCY, PERCENT, MEDIAN, or MODE is requested for variables with a wide range of values. The amount of workspace required is 20 + 8*(max − min + 1) bytes per variable per function per break. If the same range is used for different statistics for the same variable, only one set of cells is collected. For example, FREQUENCY(1,100)(VARA) PERCENT(1,100)(VARA) requires only 820 bytes.
  • If TOTAL is in effect, workspace requirements are almost doubled.
  • Memory requirements also increase if value labels are displayed for variables with many value labels. The amount of workspace required is 4 + 24*n bytes per variable, where n is the number of value labels specified for the variable.