- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
There are several ways to shrink your output. There is no "shrink to fit" with ODS because ODS leaves it to the viewer/rendering software to control printing issues. There are some SAS options that you can set that specifically affect PDF output. For example these options are one place to start:
[pre]
options orientation=landscape nocenter
topmargin=.25in
bottommargin=.25in
leftmargin=.25in rightmargin=.25in ;
[/pre]
Since you are using Proc Report, you are in luck. You can test different runs of Proc Report to ODS PDF using the STYLE= statement level overrides that are possible with REPORT, PRINT and TABULATE procedures.
You can try several things:
1) reduce all the fonts for headers and data cells (possibly change the font_face to a "narrow" font)
2) reduce cell padding values (cell padding is the "white space" around the text in a cell)
3) reduce of remove the cell spacing (cell spacing is the amount of space "between" each cell") -- a cellspacing=0 specification would essentially be used to suppress spaces between the cells
4) experiment with values for RULES= and FRAME= style attributes
5) experiment with setting explicit cellwidth values (I list this last because this is the most finicky to change, in my opinion)
So, for example to do #1, you would change your proc report to:
[pre]
** use above options statement;
ods pdf file='c:\temp\testfont.pdf';
proc report data=sashelp.class nowd
style(report)={font_size=9pt}
style(header)={font_size=9pt}
style(column)={font_size=8pt};
column name age height;
...
run;
ods pdf close;
[/pre]
Of course, you would use your data where I have sashelp.class listed. Then to reduce cellpadding, you would revisit your proc report statement with the following change/addition to reduce cellpadding from the PDF default of 4pt to 2pt and to change cellspacing from the .25pt default to .15pt:
[pre]
proc report data=sashelp.class nowd
style(report)={font_size=9pt cellpadding=2pt
cellspacing=.15pt}
style(header)={font_size=9pt}
style(column)={font_size=8pt};
... sas code ...
[/pre]
To remove ALL interior table lines, and exterior box and possibly gain back some space, you can try this:
[pre]
proc report data=sashelp.class nowd
style(report)={font_size=9pt cellpadding=2pt
cellspacing=0 rules=none
frame=void}
style(header)={font_size=9pt}
style(column)={font_size=8pt};
... sas code ...
[/pre]
I find that reducing margins, font_size and cellpadding generally get my reports to fit when they are very wide. Earlier in the forum, I posted an example macro program that demo'd how font changes could make a very wide report fit in landscape orientation. If you search this forum for a posting entitled, "Dealing with very wide tables", you can copy the macro program from there.
I hope this helps you with your report.
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Cynthia,
I have 62 columns in my report and about 40 rows. I want my report in 3 pages.( 16 columns in 1st page and 23 each on 2nd and 3rd) is there a way I can control this?
I prefer pdf out put as it preserves SAS formatting.
Thanks,
Raghu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I almost didn't see this, because it was piggybacked in the middle of a post that was answered several years ago.
I guess I don't quite understand what you want. My tendency would be to do 3 separate proc reports or proc prints, especially if you make it so that each of your 40 obs fits on 1 page:
1 for page 1, list columns 1-16
1 for page 2, list columns 17-39
1 for page 3, list columns 40-62
But, even so, I think that 40 obs will not fit on either a landscape or a portrait page unless you shrink the font size and cellpadding and change the font used, as described in the post above. Have you tried any of the suggestions above or looked at the code that was posted under the topic of dealing with very wide tables?
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
One way to do this is to set
options orientation=landscape papersize=a3;
This increases the possibilty to have the output on one page or at least to shrink the width to one page.
Best regards,
Eva