Usage Note 50247: A page break occurs after all rows are printed using the PAGE option in a DEFINE statement in PROC REPORT output routed to ODS
Starting with SAS® 9.2, when the PAGE option is used in the DEFINE statement in PROC REPORT, all observations are output for columns up to the first variable with the PAGE option specified. Then all observations are output for the rest of the columns starting with the variable with the PAGE option specified. This occurs in non-Listing destinations, specifically ODS RTF and ODS PDF. The example code on the Full Code tab demonstrates this behavior.
You can circumvent this behavior and output all columns for a set of observations and then output all columns for another set of observations. To do this, create a dummy variable upon which a page break is forced in PROC REPORT. The example code on the Full Code tabs demonstrates this circumvention.
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows XP Professional | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
Windows Vista | 9.2 TS1M0 | |
Windows Vista for x64 | 9.2 TS1M0 | |
64-bit Enabled AIX | 9.2 TS1M0 | |
64-bit Enabled HP-UX | 9.2 TS1M0 | |
64-bit Enabled Solaris | 9.2 TS1M0 | |
HP-UX IPF | 9.2 TS1M0 | |
Linux | 9.2 TS1M0 | |
Linux for x64 | 9.2 TS1M0 | |
OpenVMS on HP Integrity | 9.2 TS1M0 | |
Solaris for x64 | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
z/OS | 9.2 TS1M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The Pageit variable in the second section of code is a dummy variable upon which a page break is forced. The value of Pageit is arbitrary. Individual needs and settings determine what values should be used for Pageit.
/* Demonstrate the default behavior */
ods pdf file='default_output.pdf';
title 'Current paging behavior';
proc report data=sashelp.pricedata(obs=50) nowd;
column date price1-price12;
define date / order id;
define price7 / page;
run;
ods _all_ close;
/* Demonstrate the circumvention */
data price;
set sashelp.pricedata(obs=100);
if _n_<=25 then pageit=1;
else if 50 >= _n_ > 25 then pageit=2;
else if 75 >= _n_ > 50 then pageit=3;
else pageit=4;
run;
ods pdf file='desired_output.pdf';
title 'Circumvention';
proc report data=price nowd;
column pageit date price1-price12;
define date / order id;
define price7 / page;
define pageit / order noprint;
break after pageit / page;
run;
ods pdf close;
In non-Listing destinations, specifically ODS RTF and PDF, when the PAGE option is used in the DEFINE statement, all observations are output for columns up to the PAGE option variable. Then all observations are output for the rest of the columns starting with the PAGE option variable.
Date Modified: | 2013-07-09 14:52:35 |
Date Created: | 2013-06-24 12:42:46 |