Sample 25118: How to repeat a column on every page using PROC REPORT
If a report has too many variables to print across a single page, the
ID option can be used in the DEFINE statement of one or more variables. This forces the variable(s) to print on each page when wrapping occurs.
If additional control over pagination is desired, the PAGE option can be used in the DEFINE statement to control where a horizontal page break will occur.
The sample code on the Full Code tab illustrates these options.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The ID option is used in the DEFINE statement of the variable DATE. This forces the variable DATE to print on each page when wrapping occurs. The PAGE option is used in the DEFINE statement of the variable Price7 to force a horizontal page break before the variable.
options orientation=portrait center topmargin=.25in;
ods pdf file='proc_report_id_page.pdf' notoc;
title "ID specified on Date variable";
title2 "PAGE specified on Price7 variable";
proc report data=sashelp.pricedata(obs=15) nowd;
column date price1-price12;
define date / order id;
define price7 / page;
run;
ods _all_ close;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This is an example of using the ID option in PROC REPORT.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> REPORT
|
| Date Modified: | 2005-08-19 10:08:19 |
| Date Created: | 2005-01-27 12:15:54 |
Operating System and Release Information
| SAS System | Base SAS | All | n/a | n/a |