BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
5 REPLIES 5
Cynthia_sas
SAS Super FREQ
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
data_null__
Jade | Level 19
> 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.
Cynthia_sas
SAS Super FREQ
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
deleted_user
Not applicable
Thanks for the help.

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

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 5 replies
  • 1840 views
  • 0 likes
  • 3 in conversation