The SAS Output Delivery System and reporting techniques

Splitting variables in Proc report

Reply
N/A
Posts: 0

Splitting variables in Proc report

Hiya

I am creating a report that has too many variables so Proc Report splits the report and starts a new table with the left over variables. is there a way that I can choose where the table is split?

Drew
SAS Super FREQ
Posts: 8,743

Re: Splitting variables in Proc report

Hi:
Partly the answer depends on your destination. In the LISTING destination, you could use Linesize and Pagesize options to tell PROC REPORT how wide or narrow the report row should be. You can also use the ID attribute on the DEFINE statement to say which variables should appear as "identifying" variables on a wrapped report.

If you are dealing with ODS HTML and HTML output, however, the report can be as wide as it needs to be.

If you are dealing with ODS RTF and/or ODS PDF, then you might wish to search the forums for the string "very wide". There have been previous forum postings that show how to change the font_size, cellwidth and cellpadding for RTF and PDF in order to "scrunch" a very wide report horizontally.

cynthia
Respected Advisor
Posts: 3,777

Re: Splitting variables in Proc report

> with the left over variables. is there a way that I
> can choose where the table is split?

Define statement option:

PAGE
inserts a page break just before printing the first column containing values of the report item.

It may not be supported by all output destinations.
SAS Super FREQ
Posts: 8,743

Re: Splitting variables in Proc report

I didn't mention PAGE because it works differently in ODS destinations than in LISTING:

In listing destinations, a PAGE option on the DEFINE statement causes PROC REPORT to print this column and all columns to its right on a new page. However, for ODS MARKUP, HTML, PRINTER , and RTF destinations, the page break doesn't occur until all the rows in the report have been printed. Therefore, PROC REPORT prints all the rows for all the columns to the left of the PAGE column and then starts over at the top of the report and prints the PAGE column and the columns to the right.
(from the DEFINE statement doc)


...which may be undesirable to rely on if you plan to eventually use ODS for the report.

cynthia
N/A
Posts: 0

Re: Splitting variables in Proc report

Thanks for the help.

My destination is ODS PDF. The options aren't working - would the template I have created overwrite these?

Drew
SAS Super FREQ
Posts: 8,743

Re: Splitting variables in Proc report

Hi:
Nothing in your template (a STYLE?? template) would have an impact on these PROC REPORT options.
The fact is that the option, as explained in the DOC, will NOT work in PDF as it does in LISTING.

This is probably undesirable behavior. You may want to search the forums for the previous posting on dealing with very wide reports.
These changes may result in fitting your output on the page:
1) changing PDF orientation to landscape
2) changing PDF margins
3) changing the papersize to legal
#1, #2 and #3 go on an OPTIONS statement
4) changing the table cellpadding to be smaller
5) changing the table fonts to be smaller (the very wide program posted previously showed the impact of changing fonts)
5) removing interior table lines

cynthia
Ask a Question
Discussion stats
  • 5 replies
  • 379 views
  • 0 likes
  • 3 in conversation