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;

 

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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