<?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: ods HTML displays tables differently in 9.2 in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62899#M7402</link>
    <description>Hi:&lt;BR /&gt;
  There are several things to try. However, if you are generating this output in the context of a stored process using the BI Platform, then you may want to work with Tech Support.&lt;BR /&gt;
&lt;BR /&gt;
  1) try using ODS HTML3 versus ODS HTML. Some changes between the 2 version is that ODS HTML3 generates HTML 3.2 compliant tags -- this was a version of HTML, in which the CSS was not required. ODS HTML in SAS 9 generates HTML 4.01 compliant tags. In the HTML 4 spec, in-line CSS or external CSS references were required.&lt;BR /&gt;
 &lt;BR /&gt;
  2) If you do use ODS HTML3, then one thing you can do is either point to a "dummy" css file&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html3 path='c:\temp' (url=none)&lt;BR /&gt;
          file='ht3_fakecss.html'&lt;BR /&gt;
          stylesheet=(url='nothing.css');&lt;BR /&gt;
             &lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
run;&lt;BR /&gt;
             &lt;BR /&gt;
ods html3 close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
         &lt;BR /&gt;
or point to a "real" css file:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html3 path='c:\temp' (url=none)&lt;BR /&gt;
          file='ht3_real_css.html'&lt;BR /&gt;
          stylesheet=(url=http://www.wombat.com/styledir/corpstyle.css');&lt;BR /&gt;
          &lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html3 close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
         &lt;BR /&gt;
In the first instance, a link tag will be built that points to a file called "nothing.css" -- which is just a fake name -- this will remove any inline style and keep any &amp;lt;font&amp;gt; tags out of the HTML tags. The &amp;lt;TABLE&amp;gt; tag will be generated the "old way", as you desire. In the second instance, assuming that you do have a corporate CSS file that you want/need to use, then the STYLESHEET= option points to the real location of the real CSS file to be used.&lt;BR /&gt;
&lt;BR /&gt;
CSS and stylesheets work slightly differently on the BI platform. Not all client applications will use a CSS stylesheet -- for example, Web Report Studio and the SAS Add-in for Microsoft Office (PowerPoint) might both use different CSS (defined in the XML that styles WRS, for example; or as style is defined for the SASReport XML received by PowerPoint).&lt;BR /&gt;
 &lt;BR /&gt;
  You might want to work with Tech Support, anyway, as the technique you show (FILE PRINT PS=80 LS=200 and LL=remain) are LISTING only techniques and might not work with ODS HTML. Or, if they have worked in the past, they might not continue to work as they did in the past.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
this is a useful page:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/ods/templateFAQ/Template_csstyle.html#defaults" target="_blank"&gt;http://support.sas.com/rnd/base/ods/templateFAQ/Template_csstyle.html#defaults&lt;/A&gt;</description>
    <pubDate>Fri, 06 May 2011 11:37:06 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2011-05-06T11:37:06Z</dc:date>
    <item>
      <title>ods HTML displays tables differently in 9.2</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62898#M7401</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
I'm running the same SAS program in version 9.1.3 and in version 9.2&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
An HTML output file is being produced using these statements:&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
    ods html path ="C:/Temp" file ="MyFile.html" ;&lt;BR /&gt;
    title1  "My-Title-1";&lt;BR /&gt;
&lt;BR /&gt;
    data _null_;&lt;BR /&gt;
      set work.mydata;&lt;BR /&gt;
      by descending year;&lt;BR /&gt;
      file print ps=80 ls=200 ll=remain; &lt;BR /&gt;
      if first.year then&lt;BR /&gt;
        put ''&lt;BR /&gt;
            '&lt;FONT size="-1"&gt; Lines as per: ' year&lt;BR /&gt;
            ' &lt;/FONT&gt;';&lt;BR /&gt;
&lt;BR /&gt;
      put ...;&lt;BR /&gt;
      ......&lt;BR /&gt;
    run;&lt;BR /&gt;
    ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
(Maybe it's not very elegant using a data step, but it has worked fine so far.)&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;B&gt;But now:&lt;/B&gt; The appearance of the html files in a browser is quite different between the two versions of SAS.&lt;BR /&gt;&lt;BR /&gt;
It sounds not like a big deal to handle this but I just don't find the clue.&lt;BR /&gt;&lt;BR /&gt;
On another occasion (basically the same data-step), I produce frames, ToC and Table of Pages - they all look perfect.&lt;BR /&gt;&lt;BR /&gt;
The issue arouses only in the 'file=' output.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
The cause of the different appearance lies in a single html-"table"-tag description:&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
9.1.3 produces:&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;TABLE class="Batch" cellspacing="1" cellpadding="7" rules="groups" frame="box" border="1px" bordercolor="#000000" summary="Page Layout"&gt;&lt;BR /&gt;
&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR /&gt;
&lt;PRE style="border:none" class="l Batch"&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD colspan="7"&gt;&lt;FONT size="-1"&gt; Lines as per: 2011  &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
9.2 produces:&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;TABLE cellspacing="0" cellpadding="0" summary="Page Layout"&gt;&lt;BR /&gt;
&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR /&gt;
&lt;PRE class="Batch"&gt;&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD colspan="7"&gt;&lt;FONT size="-1"&gt; Lines as per: 2011  &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
If I replace just the definition of the 9.2-table-tag with the 9.1.3-table-tag using a text editor like notepad the output appears exactly the same in both versions.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
My fruitless efforts have been so far:&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
1.&lt;BR /&gt;&lt;BR /&gt;
I have tried to make my on style and use it:&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
   proc template;&lt;BR /&gt;
      define style myownstyle ;&lt;BR /&gt;
         parent = styles.default ;&lt;BR /&gt;
         replace Table /&lt;BR /&gt;
           borderspacing= 1&lt;BR /&gt;
           padding      = 7&lt;BR /&gt;
           rules        = groups&lt;BR /&gt;
           frame        = box&lt;BR /&gt;
           bordercolor  = #000000 ;&lt;BR /&gt;
      end;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
Comparing the 9.1.3 'default' style with the one in 9.2 shows (as expected) differences - &lt;BR /&gt;
except for the table definition. &lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
There are no specific properties specified for 'table'. So that did not help.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
2.&lt;BR /&gt;&lt;BR /&gt;
The html file contains a lot of css-definitions. As 'class=Batch' is used, I tried to make my own css-file using the EnterpriseGuide 4.3 Style Manager. &lt;BR /&gt;&lt;BR /&gt;
But I didn't succeed having the 'ods html'-statement READ my css-file. It always wanted to WRITE it.&lt;BR /&gt;
&lt;BR /&gt;I got lost in the documentation about 'ods markup tagset=htmlcss stylesheet='.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
Am I ending up using a data step and process the html-file like&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
    filename myFile "C:/Temp/MyFile.html";&lt;BR /&gt;
    data _null_;&lt;BR /&gt;
      length text $ 400;&lt;BR /&gt;
      infile  myFile  length=reclen truncover;&lt;BR /&gt;
      file    myFile  ps=200        noprint;&lt;BR /&gt;
      input @;&lt;BR /&gt;
      input text $varying400. reclen;&lt;BR /&gt;
&lt;BR /&gt;
      if   text = '&amp;lt;92-table&amp;gt;'&lt;BR /&gt;
      then text = '&amp;lt;913-table&amp;gt;';&lt;BR /&gt;
&lt;BR /&gt;
      put   text $varying400. reclen;&lt;BR /&gt;
    run; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
???&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
That would work but it hurts, doesn't it. We should not manipulate the outcome but we do want to control the production, don't we?&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
Please, I kindly invite you to share your ideas with me.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
Thanks&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 06 May 2011 10:16:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62898#M7401</guid>
      <dc:creator>smeyerch</dc:creator>
      <dc:date>2011-05-06T10:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: ods HTML displays tables differently in 9.2</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62899#M7402</link>
      <description>Hi:&lt;BR /&gt;
  There are several things to try. However, if you are generating this output in the context of a stored process using the BI Platform, then you may want to work with Tech Support.&lt;BR /&gt;
&lt;BR /&gt;
  1) try using ODS HTML3 versus ODS HTML. Some changes between the 2 version is that ODS HTML3 generates HTML 3.2 compliant tags -- this was a version of HTML, in which the CSS was not required. ODS HTML in SAS 9 generates HTML 4.01 compliant tags. In the HTML 4 spec, in-line CSS or external CSS references were required.&lt;BR /&gt;
 &lt;BR /&gt;
  2) If you do use ODS HTML3, then one thing you can do is either point to a "dummy" css file&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html3 path='c:\temp' (url=none)&lt;BR /&gt;
          file='ht3_fakecss.html'&lt;BR /&gt;
          stylesheet=(url='nothing.css');&lt;BR /&gt;
             &lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
run;&lt;BR /&gt;
             &lt;BR /&gt;
ods html3 close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
         &lt;BR /&gt;
or point to a "real" css file:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html3 path='c:\temp' (url=none)&lt;BR /&gt;
          file='ht3_real_css.html'&lt;BR /&gt;
          stylesheet=(url=http://www.wombat.com/styledir/corpstyle.css');&lt;BR /&gt;
          &lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html3 close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
         &lt;BR /&gt;
In the first instance, a link tag will be built that points to a file called "nothing.css" -- which is just a fake name -- this will remove any inline style and keep any &amp;lt;font&amp;gt; tags out of the HTML tags. The &amp;lt;TABLE&amp;gt; tag will be generated the "old way", as you desire. In the second instance, assuming that you do have a corporate CSS file that you want/need to use, then the STYLESHEET= option points to the real location of the real CSS file to be used.&lt;BR /&gt;
&lt;BR /&gt;
CSS and stylesheets work slightly differently on the BI platform. Not all client applications will use a CSS stylesheet -- for example, Web Report Studio and the SAS Add-in for Microsoft Office (PowerPoint) might both use different CSS (defined in the XML that styles WRS, for example; or as style is defined for the SASReport XML received by PowerPoint).&lt;BR /&gt;
 &lt;BR /&gt;
  You might want to work with Tech Support, anyway, as the technique you show (FILE PRINT PS=80 LS=200 and LL=remain) are LISTING only techniques and might not work with ODS HTML. Or, if they have worked in the past, they might not continue to work as they did in the past.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
this is a useful page:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/ods/templateFAQ/Template_csstyle.html#defaults" target="_blank"&gt;http://support.sas.com/rnd/base/ods/templateFAQ/Template_csstyle.html#defaults&lt;/A&gt;</description>
      <pubDate>Fri, 06 May 2011 11:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62899#M7402</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-05-06T11:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: ods HTML displays tables differently in 9.2</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62900#M7403</link>
      <description>In each version of SAS, we have been trying to move to using more CSS attributes and fewer tables to do the formatting.  The class=batch should be drawing the border on the output, but it sounds like you aren't seeing that.  You could try adding borders to the batch style element similarly to the way that you tried with table as follows:&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
      define style myownstyle ;&lt;BR /&gt;
         parent = styles.default ;&lt;BR /&gt;
         class batch /&lt;BR /&gt;
           bordercolor  = #000000&lt;BR /&gt;
           borderwidth = 1px&lt;BR /&gt;
           borderstyle = solid;&lt;BR /&gt;
      end;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 06 May 2011 13:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62900#M7403</guid>
      <dc:creator>Kevin_SAS</dc:creator>
      <dc:date>2011-05-06T13:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: ods HTML displays tables differently in 9.2</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62901#M7404</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your hyper-fast reply with those valueable hints. (You acutally saved my weekend)&lt;BR /&gt;
&lt;BR /&gt;
First I tired  ODS HTML3  without any further style- or stylesheet-parameter. &lt;BR /&gt;
It delivered the best results, a 99.8% match to the version 9.1.3 output. (In appearance only of course. The actual file contents is rather different as expected.)&lt;BR /&gt;
&lt;BR /&gt;
The "dummy" css approach came close too. I would have had to work on background colors and fonts but the borders/frames/boxes looked fine.&lt;BR /&gt;
&lt;BR /&gt;
The "real" css shows a 95% match. The 'light' that 'shines' from top left onto the page makes the frame appear a bit different. But it is very interesting to modify the css file and reload the ready html output in the browser and see how changes instantly apply.&lt;BR /&gt;
(Pardon my childish enthusiasm but as a bone dry data cruncher discovering web technologies is fascinating  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The code is running in SAS Foundation, there is no BI platform or -studio involved. Anyway, I hope the underlying legacy system is not running for long anymore. That would give us the chance to get rid of this data-step html output creation.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks again for your support. It has improved my understanding of the pricipals of html output building a lot.</description>
      <pubDate>Mon, 09 May 2011 12:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62901#M7404</guid>
      <dc:creator>smeyerch</dc:creator>
      <dc:date>2011-05-09T12:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: ods HTML displays tables differently in 9.2</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62902#M7405</link>
      <description>Hi Kevin,&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
Thank you for your example of proc template.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
You are right, I do not see a border around the table and fonts are also different from the 9.1.3 version.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
I have noticed the statement&lt;BR /&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
  border: 1px solid #000000;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
in the .Batch{} definition of the SAS 'default' style. Wouldn't this cover the statements in your example?&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
Working with the style editor in Enterprise Guide produced this .Batch{} definition for my own css file (see reply to cynthia). It contains your statements:&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
.Batch{&lt;BR /&gt;
	font-family: 'sas monospace','courier new',courier,monospace;&lt;BR /&gt;
	font-size: x-small;&lt;BR /&gt;
	color: #000000;&lt;BR /&gt;
	background-color: #D3D3D3;&lt;BR /&gt;
	font-style: normal;&lt;BR /&gt;
	font-weight: normal;&lt;BR /&gt;
	padding-top: 7px;&lt;BR /&gt;
	padding-right: 7px;&lt;BR /&gt;
	padding-bottom: 7px;&lt;BR /&gt;
	padding-left: 7px;&lt;BR /&gt;
	margin-top: 1px;&lt;BR /&gt;
	margin-right: 1px;&lt;BR /&gt;
	margin-bottom: 1px;&lt;BR /&gt;
	margin-left: 1px;&lt;BR /&gt;
        border-width: 1px;&lt;BR /&gt;
	border-style: solid;&lt;BR /&gt;
	border-color: #000000;&lt;BR /&gt;
	border-collapse: separate;&lt;BR /&gt;
	border-spacing: 1px;&lt;BR /&gt;
}&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
The next time I'm faced with such a challange I'll re-write the program to avoid using a data step to produce html output.</description>
      <pubDate>Mon, 09 May 2011 12:18:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-HTML-displays-tables-differently-in-9-2/m-p/62902#M7405</guid>
      <dc:creator>smeyerch</dc:creator>
      <dc:date>2011-05-09T12:18:57Z</dc:date>
    </item>
  </channel>
</rss>

