REPORT Procedure

Tips: Supports the Output Delivery System. For details, see Output Delivery System: Basic Concepts in SAS Output Delivery System: User's Guide.

You can use the ATTRIB, FORMAT, LABEL, and WHERE statements with the PROC SORT procedure. For more information, see Statements with the Same Function in Multiple Procedures. You can also use any global statement. For a list, see Global Statements in SAS Statements: Reference.

For in-database processing to occur, your data must reside within a supported version of a DBMS that has been properly configured for SAS in-database processing. For more information, see In-Database Processing for PROC REPORT.

Syntax

PROC REPORT <option(s)>;
BREAK location break-variable</ option(s)>;
BY <DESCENDING> variable-1
<…<DESCENDING> variable-n> <NOTSORTED>;
COLUMN column-specification(s);
COMPUTE location <target>
</ STYLE=<style-element-name> <[style-attribute-specification(s)]>>;
LINE specification(s);
. . . select SAS language elements . . .
COMPUTE report-item </ type-specification>;
CALL DEFINE (column-id, 'attribute-name', value);
. . . select SAS language elements . . .
DEFINE report-item / <usage>
<attribute(s)>
<option(s)>
<justification>
<COLOR=color>
<'column-header-1' <…'column-header-n'>>
<style>;
FREQ variable;
RBREAK location </ option(s)>;
WEIGHT variable;

Table of Procedure Tasks

Statement Task Example
PROC REPORT Statement Produce a summary or detail report Ex. 1, Ex. 2, Ex. 5, Ex. 6, Ex. 7, Ex. 8, Ex. 11, Ex. 12, Ex. 13, Ex. 15, Ex. 16
BREAK Statement Produce a default summary at a change in the value of a group or order variable Ex. 2, Ex. 4, Ex. 5, Ex. 8, Ex. 9
BY Statement Create a separate report for each BY group  
CALL DEFINE Statement Set the value of an attribute for a particular column in the current row Ex. 4, Ex. 16
COLUMN Statement Describe the arrangement of all columns and of headings that span more than one column Ex. 1, Ex. 3, Ex. 5, Ex. 6, Ex. 10, Ex. 11
COMPUTE Statement Specify one or more programming statements that PROC REPORT executes as it builds the report Ex. 2, Ex. 3, Ex. 4, Ex. 5, Ex. 9, Ex. 10, Ex. 13, Ex. 16
ENDCOMP Statement Specify one or more programming statements that PROC REPORT executes as it builds the report Ex. 2
DEFINE Statement Describe how to use and display a report item Ex. 2, Ex. 3, Ex. 4, Ex. 5, Ex. 6, Ex. 9, Ex. 10, Ex. 12, Ex. 13, Ex. 14, Ex. 16
FREQ Statement Treat observations as if they appear multiple times in the input data set  
LINE Statement Provide a subset of features of the PUT statement for writing customized summaries Ex. 2, Ex. 3, Ex. 4, Ex. 5, Ex. 9
RBREAK Statement Produce a default summary at the beginning or end of a report or at the beginning and end of each BY group Ex. 1, Ex. 10
WEIGHT Statement Specify weights for analysis variables in the statistical calculations