Help using Base SAS procedures

PROC Tabulate - Control page breaks between rows

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 17
Accepted Solution

PROC Tabulate - Control page breaks between rows

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


Accepted Solutions
Solution
‎07-07-2011 05:37 PM
SAS Super FREQ
Posts: 8,744

PROC Tabulate - Control page breaks between rows

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


All Replies
Solution
‎07-07-2011 05:37 PM
SAS Super FREQ
Posts: 8,744

PROC Tabulate - Control page breaks between rows

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 969 views
  • 0 likes
  • 2 in conversation