Hi!
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
... View more