Creating Enhanced List and Summary Reports |
Lesson
Summary![]() |
This page contains
|
I. Text Summary
To go to the page where a task, programming feature, or concept was presented, select a link. |
Creating a Default List Report To create a default list report, you submit a basic PROC REPORT step. You can specify options to invoke the procedure in either a windowing or nonwindowing mode. By default, all observations and variables in the data set are printed, and variables appear in the order in which they occur in the data set.
Selecting Variables
Selecting Observations
Defining Variables
Defining Column Attributes Enhancing the Heading's Appearance
Defining Variable Usage |
Variable Usage in PROC REPORT | |
Display variables |
do not affect the order of rows in the report. A report that contains one or more display variables has a detail row for each observation in the data set. Each detail row contains a value for each display variable. By default, PROC REPORT treats all character variables as display variables. |
Order variables |
order the detail rows in a report according to their formatted values. |
Group variables |
order the detail rows in a report according to their formatted values. If a report contains one or more group variables, PROC REPORT tries to consolidate into one row all observations from the data set that have a unique combination of values for all group variables. |
Across variables |
are functionally similar to group variables; however, PROC REPORT displays the groups that it creates for an across variable horizontally rather than vertically. |
Analysis variables |
are used to calculate a statistic. By default, PROC REPORT uses numeric variables as analysis variables, which are used to calculate the SUM statistic. |
Computed variables |
are variables that you define for the report. They are not in the data set. You cannot change the usage of a computed variable. Computed variables can be either numeric or character variables. |
Specifying Statistics To associate a statistic with an analysis variable, specify it as an attribute in the DEFINE statement.
|
II. Syntax
To go to the page where a statement or option was presented, select a link. |
proc report data=clinic.diabetes nowd; column sex weight fastgluc postgluc glucrange; where age>40; define weight / format=comma6.2 spacing=4 'Average/Weight' width=7; define sex / order width=7 spacing=4 center 'Sex of/Patient'; define fastgluc / 'Minimum/Fasting/Glucose'; define postgluc / 'Maximum/Postprandial/Glucose' width=12; define glucrange / computed 'Glucose/Range'; compute glucrange; glucrange=postgluc.sum-fastgluc.sum; endcomp; run; |
IV. Points to Remember
|
![]() ![]() ![]() ![]() ![]() |
|
![]() |
![]() |