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
SAS Super FREQ

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
SAS Super FREQ

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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

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