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;
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;
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.
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!
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.
Ready to level-up your skills? Choose your own adventure.