BookmarkSubscribeRSS Feed
ey_accelagen
Calcite | Level 5

When I am using the ACROSS option which results in too many columns to fit across the page, the second set of columns are showing on the same page, rather than starting on a new page.  How can I force the overflow columns onto a new page?  

 

Here is an example of my current program:

 

data TEST;
	CATEGORY = "CATEGORY";
	SUBCATEGORY = "SUBCATEGORY";
	RESULT = "XXXXXXXXXXXXXXXXXXXXXXX";
	
	do i=1 to 10;
		GROUP=i;
		output;
	end;
run;

ods _all_ close;
ods tagsets.rtf_sample file="&basepath./&subfile./TEST.rtf";
options nonumber nodate PAGENO=1 orientation=landscape papersize="ISO A4" 
	topmargin="0.5 in" bottommargin="0.5 in" rightmargin="0.5 in" leftmargin="0.5 in";
	
Title1 j=l "Title";
Footnote1 j=l "Footnote";

proc report data=TEST headline headskip missing split="|" nocenter nowd spanrows;
	column CATEGORY SUBCATEGORY GROUP, RESULT;
	
	define CATEGORY / group order=data id;
	define SUBCATEGORY / group id;
	define GROUP / group across "";
	define RESULT / group "Result";
	
	break after CATEGORY / page;
run;

ods tagsets.rtf_sample close;
ods listing;
2 REPLIES 2
Ksharp
Super User
data TEST;
 CATEGORY = "CATEGORY";
 SUBCATEGORY = "SUBCATEGORY";
 RESULT = "XXXXXXXXXXXXXXXXXXXXXXX";
 
 do i=1 to 10;
  GROUP=i;
  output;
 end;
run;


ods _all_ close;
ods tagsets.rtf_sample file="c:\temp\TEST.rtf";
options nonumber nodate PAGENO=1 orientation=landscape papersize="ISO A4" 
 topmargin="0.5 in" bottommargin="0.5 in" rightmargin="0.5 in" leftmargin="0.5 in";
 
Title1 j=l "Title";
Footnote1 j=l "Footnote";

proc report data=TEST   missing split="|"  nowd spanrows style={outputwidth=100%};
 column CATEGORY SUBCATEGORY GROUP, RESULT;
define _all_/style={cellwidth=1%}; 
 define CATEGORY / group order=data id;
 define SUBCATEGORY / group id;
 define GROUP / group across "";
 define RESULT / group "Result";
 
 break after CATEGORY / page;
run;

ods tagsets.rtf_sample close;
ods listing;

Ksharp_0-1657626993435.png

 

ey_accelagen
Calcite | Level 5

Thanks for your reply.  This workaround of avoiding the page overflow, would be appropriate for some scenarios, however there are many scenarios where that is not practical.   

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1256 views
  • 0 likes
  • 2 in conversation