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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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