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. 

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 below demonstrates the default behavior and the circumvention. 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;

For example of default behavior output, see Default Output.

For example of circumvention output, see Circumvention Output.