Although "proc report" has been around for a good number of years, skill with it is limited among sas programmers who work in the field of clinical reporting. Getting the "proc report" output to look right is still a challenge. One of the challenges is in avoiding unwanted lines in the report column headers and avoiding unwanted gaps in the data display. How to achieve this is not intuitive. A few "tricks" and techniques must be learned.
This page is going to be a long tutorial and the aim is to teach you those tricks and techniques you need to know to achieve a nicely "flattened" proc report output. By "flattened" is meant avoiding unwanted column header lines and unwanted gaps in the data display. You will be strongly encouraged to run sas code yourself to experiment with "proc report", so to help you, some datasets will be made available for you to practise on.
Before we start, I know that many of you will not have time to work through this tutorial and even if you did, a lot of people won't bother, so I am going to reveal the ultimate recommendation here, as I will in the Conclusion, and that is when using "proc report", it is best to transpose your datasets, if your datasets are not already in a convenient form, so that each column shown in the report is an individual variable. That way you have more control over the output, you will not be plagued with unwanted line throws and gaps in the data display and you can adjust the spacing between individual columns and so make the report look good.
The datasets you can link to below are the original data (though reblinded
and transformed) followed by three datasets produced by the Spectre %unistats
macro. The %unistats macro can produce three output datasets. The first
is a straightforward dataset with descriptive statistics and the next two
are transposed datasets - the first transposed by treatment variable
and the second transposed by statistics keyword (MIN, MEAN, MAX etc.).
When using the %unistats macro, you are expected to always ask the macro
to transpose your output data rather than doing it yourself in your code.
This is to make the task of "validation" easier. To find out the contents
of these datasets you can either download them and look at the contents
using sas or you can read the description of the contents in the header
of the macro %unistats.
Go back to the home page.
E-mail the macro and web site author.