BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Brian
Obsidian | Level 7

Hi,

I am using ODS PDF with PROC Tabulate and I have multiple nested rows. Is there a way to control page breaks between rows? I want to avoid unnecessarily splitting a nested row over two pages.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

Hi:

   You can use BY groups with PROC TABULATE to try to have it create a new page for every BY group -- this means that one level of your nested rows would possibly move to a BY statement. Or, you could add a PAGE dimension to your TABLE statement -- which means that one of your nested rows might move to a PAGE dimension instead of a ROW dimension.

  Otherwise, in a table with nested rows, you do not have  any option to control where to put page breaks (except to use BY or PAGE scenarios). ODS PDF calculates page size based on a variety of factors -- such as the various margin options, the font used for the output, the cellspacing, cellpadding and border options. For example, a tabular report created with a 20 pt font will have fewer rows than a tabular report creaed with a 10pt font -- ODS PDF takes this all into account when building the PDF result file.

  PROC REPORT gives you a bit more flexibility around page breaking -- you could at least create a separate variable to be sort of a "fake" page break variable, but without knowing more about your data and your code, it's hard to provide a very useful alternative.

cynthia

View solution in original post

1 REPLY 1
Cynthia_sas
Diamond | Level 26

Hi:

   You can use BY groups with PROC TABULATE to try to have it create a new page for every BY group -- this means that one level of your nested rows would possibly move to a BY statement. Or, you could add a PAGE dimension to your TABLE statement -- which means that one of your nested rows might move to a PAGE dimension instead of a ROW dimension.

  Otherwise, in a table with nested rows, you do not have  any option to control where to put page breaks (except to use BY or PAGE scenarios). ODS PDF calculates page size based on a variety of factors -- such as the various margin options, the font used for the output, the cellspacing, cellpadding and border options. For example, a tabular report created with a 20 pt font will have fewer rows than a tabular report creaed with a 10pt font -- ODS PDF takes this all into account when building the PDF result file.

  PROC REPORT gives you a bit more flexibility around page breaking -- you could at least create a separate variable to be sort of a "fake" page break variable, but without knowing more about your data and your code, it's hard to provide a very useful alternative.

cynthia

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

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 2880 views
  • 0 likes
  • 2 in conversation