Published on :
Reporting SASHELP

Multi-Column Report Generation

This code is also available in: Deutsch Español Français
The script configures ODS to produce a two-column report, using the `sashelp.shoes` dataset. It displays the `region`, `stores`, and `sales` variables. The output type can be RTF, PDF, or PostScript, and the orientation is set to landscape.
Data Analysis

Type : SASHELP


The script uses the `sashelp.shoes` dataset, which is a standard SAS library available by default in all SAS installations.

1 Code Block
ODS / GOPTIONS
Explanation :
This block initializes the parameters for the report output. It sets the ODS destination ('dest' as RTF by default, but can be PDF or PS), the number of columns ('cols' to 2), and the output file path. `goptions rotate=landscape` configures the page orientation to landscape.
Copied!
1%let dest=rtf; * pdf, ps or rtf ;
2%let cols=2 ;
3ods &dest columns=&cols file="c:\workshop\hw06\test.&dest" ;
4goptions rotate=landscape ;
2 Code Block
PROC PRINT
Explanation :
PROC PRINT is used to display data from the `sashelp.shoes` dataset. The `var` clause specifies that only the `region`, `stores`, and `sales` variables should be included in the report.
Copied!
1 
2PROC PRINT
3DATA=sashelp.shoes ;
4var region stores sales ;
5RUN ;
6 
3 Code Block
ODS
Explanation :
This block closes the previously opened ODS destination, which finalizes the report generation in the specified file.
Copied!
1ods &dest close ;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.