If I make a gridded layout in ODS, I have problems controlling the page breaks. I have made a simplified piece of code that illustrates my problem, see below.
The gridded layout below makes 2 rows and 1 column.
Because row 2 takes up more than a whole page, a page break comes after row 1. But I would like to suppress this page break.
Does anybody know how to do that?
ods pdf file="C:\Temp\test.pdf" startpage=never;
ods layout gridded rows=2 columns=1;
ods region style=[backgroundcolor=#BDC3C7 font_size=20];
ods pdf text="Test header";
ods region;
proc print data=sashelp.class; run;
proc print data=sashelp.class; run;
proc print data=sashelp.class; run;
proc print data=sashelp.class; run;
proc print data=sashelp.class; run;
proc print data=sashelp.class; run;
proc print data=sashelp.class; run;
ods layout end;
If you precede every proc print with a "ods region;" statement you can get that. But I couldn't explain that from the theory 😉
ods pdf file="/tmp/test.pdf" startpage=never;
ods layout gridded rows=2 columns=1;
ods region style=[backgroundcolor=#BDC3C7 font_size=20];
ods pdf text="Test header" ;
ods region ;
proc print data=sashelp.class; run;
ods region ;
proc print data=sashelp.class; run;
ods region ;
proc print data=sashelp.class; run;
ods region ;
proc print data=sashelp.class; run;
ods region ;
proc print data=sashelp.class; run;
ods region ;
proc print data=sashelp.class; run;
ods region ;
proc print data=sashelp.class; run;
ods layout end;
How would you suppress page break here?
ods pdf file="/tmp/test.pdf" startpage=never;
ods layout gridded rows=2 columns=1;
ods region style=[backgroundcolor=#BDC3C7 font_size=20];
ods pdf text="Test header" ;
ods region ;
proc print data=sashelp.BWEIGHT (obs=200); run;
ods layout end;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: