Although you can customize the output produced by PROC PRINT, there are times when you need a bit more control over the appearance of your report. PROC REPORT was
developed to fit this need. Not only can you control the appearance of every column of
your report, you can produce summary reports as well as detail listings. Lets see using PROC Report in the examples.
#Problem:
By using the same blood data set fro the previous post we want to produce a summary report showing the average WBC and RBC count for each value of Gender as well as an overall average.
#Solution:
#Output:
#Explanation and Learning:
The title statement tells SAS to print the output with the given title. Also we use tell the SAS as how much the width we need for the column and what format the output should look like.
developed to fit this need. Not only can you control the appearance of every column of
your report, you can produce summary reports as well as detail listings. Lets see using PROC Report in the examples.
#Problem:
By using the same blood data set fro the previous post we want to produce a summary report showing the average WBC and RBC count for each value of Gender as well as an overall average.
#Solution:
title "Statistics from BLOOD by Gender"; proc report data=A15028.A28_blood nowd headline; column Gender WBC RBC; define Gender / group width=6; define WBC / analysis mean "Average WBC" width=7 format=comma6.0; define RBC / analysis mean "Average RBC" width=7 format=5.2; rbreak after / dol summarize; run; quit;
#Output:
#Explanation and Learning:
The title statement tells SAS to print the output with the given title. Also we use tell the SAS as how much the width we need for the column and what format the output should look like.
No comments:
Post a Comment