Hi: To elaborate a bit on Tim's posting, there are a number of PROC REPORT options (HEADLINE, HEADSKIP, SPACING, WIDTH, SKIP, DOL, DUL, OL, UL, PANELS, FLOW, etc,) that are LISTING only options -- they were designed to work in the LISTING destination and are basically ignored by the other ODS destinations. For more information, refer to: http://support.sas.com/kb/2/549.html http://support.sas.com/rnd/base/ods/templateFAQ/report1.html HTML and PDF are inherently different destinations -- so you can never guarantee that the output will look EXACTLY the same in both destinations. For example, HTML is not bound by physical page restrictions, so an HTML report can be as wide or as long as it needs to be and the only controls you have for header/column width are the default slash (/) which indicates where a header string should break or the CELLWIDTH= or WIDTH= style attribute (not to be confused with the WIDTH= option that only impacts the LISTING destination). On the other hand, PDF is bound by physical page restrictions, as it calculates column width based on a formula that takes all of the following into account: the orientation, the page margins and the size of the font and the cellpadding and cellspacing attributes. So, where a header string might take up only 1 line in HTML, that same string might take up multiple lines in the PDF destination. The use of the default slash (/) allows you to indicate an exact place in which a header string should break. If you run the program below, you will see that I have made the cells different widths (and used some differing justification), without the slash, the destinations use cellwidth to determine the overall look of the column headers. Note the appearance of the PT2 column for example -- it will wrap the header string differently in PDF versus HTML in the absence of any other instructions from me in the STYLE= statement overrides. cynthia ods listing close; options nodate nonumber center orientation=landscape; ods html file='c:\temp\usecellwidth.html' style=sasweb; ods pdf file='c:\temp\usecellwidth.pdf'; proc report data=sashelp.prdsale(obs=100) nowd split='/' style(header)={vjust=b just=c}; column prodtype prodtype=pt2 product actual predict; DEFINE PRODTYPE / GROUP "OFF BALANCE SHEET/Product Type" style(header)={just=l cellwidth=2in} style(column)={just=l}; DEFINE pt2 / GROUP "OFF BALANCE SHEET Product Type 2"; define product / group "OFF/BALANCE/SHEET/Product" style(header)={just=c cellwidth=2in} style(column)={just=r}; define actual / sum "OFF BALANCE SHEET Actual" style(header)={cellwidth=2in}; define predict / sum "OFF BALANCE SHEET Predict" style(header)={cellwidth=1in}; run; ods _all_ close;
... View more