BookmarkSubscribeRSS Feed
PNA_NYK
Calcite | Level 5

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?

 

PNA_NYK_0-1675231280955.png

 

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;

2 REPLIES 2
jklaverstijn
Rhodochrosite | Level 12

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;
PNA_NYK
Calcite | Level 5

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;

 

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
  • 832 views
  • 0 likes
  • 2 in conversation