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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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