<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PROC REPORT:  difference for HTML and PDF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-difference-for-HTML-and-PDF/m-p/15276#M3355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; 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: &lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/2/549.html"&gt;http://support.sas.com/kb/2/549.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/rnd/base/ods/templateFAQ/report1.html"&gt;http://support.sas.com/rnd/base/ods/templateFAQ/report1.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;options nodate nonumber center orientation=landscape;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\usecellwidth.html' style=sasweb;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods pdf file='c:\temp\usecellwidth.pdf';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.prdsale(obs=100) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nowd split='/'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={vjust=b just=c};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column prodtype prodtype=pt2 product actual predict;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; DEFINE PRODTYPE / GROUP "OFF BALANCE SHEET/Product Type"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={just=l cellwidth=2in}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={just=l};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; DEFINE pt2 / GROUP "OFF BALANCE SHEET Product Type 2";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define product / group "OFF/BALANCE/SHEET/Product"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={just=c cellwidth=2in}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={just=r};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define actual / sum "OFF BALANCE SHEET Actual"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={cellwidth=2in};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define predict / sum "OFF BALANCE SHEET Predict"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={cellwidth=1in};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Sep 2011 18:54:22 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2011-09-25T18:54:22Z</dc:date>
    <item>
      <title>PROC REPORT:  difference for HTML and PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-difference-for-HTML-and-PDF/m-p/15274#M3353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;dear all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;with PROC REPORT I create a label for a column: &lt;/SPAN&gt;DEFINE PROD / GROUP LEFT ORDER=DATA "OFF BALANCE SHEET/Product"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;WHen printing it to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1/ ODS directed to HMTL: ok, "3 words" are on one line, next line "product"!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;2/ ODS to PDF: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;it stacks everything in 4 lines.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;I tried, unsuccessfully, a lot of things &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;* length prod $20.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;* in proc report:&amp;nbsp;&amp;nbsp; (&lt;/SPAN&gt;DEFINE PROD / GROUP LEFT ORDER=DATA "OFF BALANCE SHEET/Product" width=20)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Any ideas??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;GreetZ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Herman&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 13:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-difference-for-HTML-and-PDF/m-p/15274#M3353</guid>
      <dc:creator>Jaheuk</dc:creator>
      <dc:date>2011-09-23T13:25:51Z</dc:date>
    </item>
    <item>
      <title>PROC REPORT:  difference for HTML and PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-difference-for-HTML-and-PDF/m-p/15275#M3354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The WIDTH option only &lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473627.htm"&gt;affects listing output&lt;/A&gt;. For non-listing output such as HTML and PDF, add a&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473627.htm"&gt; STYLE&lt;/A&gt; option to the DEFINE statement and use a &lt;A href="http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/viewer.htm#a002972093.htm"&gt;WIDTH style attribute&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 13:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-difference-for-HTML-and-PDF/m-p/15275#M3354</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2011-09-23T13:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT:  difference for HTML and PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-difference-for-HTML-and-PDF/m-p/15276#M3355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; 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: &lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/2/549.html"&gt;http://support.sas.com/kb/2/549.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/rnd/base/ods/templateFAQ/report1.html"&gt;http://support.sas.com/rnd/base/ods/templateFAQ/report1.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;options nodate nonumber center orientation=landscape;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\usecellwidth.html' style=sasweb;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods pdf file='c:\temp\usecellwidth.pdf';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.prdsale(obs=100) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nowd split='/'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={vjust=b just=c};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column prodtype prodtype=pt2 product actual predict;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; DEFINE PRODTYPE / GROUP "OFF BALANCE SHEET/Product Type"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={just=l cellwidth=2in}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={just=l};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; DEFINE pt2 / GROUP "OFF BALANCE SHEET Product Type 2";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define product / group "OFF/BALANCE/SHEET/Product"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={just=c cellwidth=2in}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={just=r};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define actual / sum "OFF BALANCE SHEET Actual"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={cellwidth=2in};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define predict / sum "OFF BALANCE SHEET Predict"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)={cellwidth=1in};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2011 18:54:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-difference-for-HTML-and-PDF/m-p/15276#M3355</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-09-25T18:54:22Z</dc:date>
    </item>
  </channel>
</rss>

