<?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 template with SAS 9.2,  issue between RTF and HTML in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46266#M6048</link>
    <description>Hi:&lt;BR /&gt;
  Some comments. I don't know why RTF and HTML are different. I suspect it has something to do with Microsoft's interpretation and rendering of the various border style attributes. With Microsoft Word, Microsoft can render as they want. With Internet Explorer, Microsoft must still stick with the W3C specs for rendering tables in a browser. If you want to know the WHY, you'll have to work with Tech Support. HTML and RTF are just different destinations and inherently contain some differences -- some more immediate and obvious (HTML output can be as wide as it needs to be; while RTF is controlled by the physical margin size and orientation) and some more subtle and not obvious until you try the same thing in both destinations (as my bordercolor program illustrated).&lt;BR /&gt;
 &lt;BR /&gt;
  If you run the program I posted with the colorful borders, you will see a difference in the way that RTF and HTML both rendered the colors on each "side" of the NAME cell. If you take that experiment a step further and get rid of borderwidth on NAME, but change the border style, again, you will see different results:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html file='border.html' style=sasweb;&lt;BR /&gt;
ods pdf file='border.pdf';&lt;BR /&gt;
ods rtf file='border.rtf';&lt;BR /&gt;
                    &lt;BR /&gt;
proc report data=sashelp.class(obs=2) nowd&lt;BR /&gt;
   style(report)={borderbottomcolor=cyan borderbottomwidth=5&lt;BR /&gt;
                  bordertopcolor=yellow bordertopwidth=5&lt;BR /&gt;
                  borderleftcolor=magenta borderleftwidth=5&lt;BR /&gt;
                  borderrightcolor=black borderrightwidth=5};&lt;BR /&gt;
                       &lt;BR /&gt;
  title "1) REPORT: borderbottomcolor= and borderbottomstyle";&lt;BR /&gt;
  column name age height;&lt;BR /&gt;
  define name / style(column)={borderbottomcolor=black borderbottomstyle=double &lt;BR /&gt;
                               bordertopcolor=green bordertopwidth=5&lt;BR /&gt;
                               borderleftcolor=blue borderleftwidth=5&lt;BR /&gt;
                               borderrightcolor=pink borderrightwidth=5};&lt;BR /&gt;
run;&lt;BR /&gt;
                             &lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                               &lt;BR /&gt;
I am only pointing out that the rendering is DIFFERENT between HTML and RTF. I do not believe it is possible to make a single TABLE template or a single STYLE template with style attribute changes that will render the same in both destinations. In fact, I don't know whether it is even possible for HTML to render the same way as the RTF file. Again, that is a question for Tech Support.&lt;BR /&gt;
 &lt;BR /&gt;
Another comment. You said that: &lt;B&gt;I cannot use proc report because i don't know exactly what the columns are and their number.&lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
Your table template does not use GENERIC -- so right now, your TABLE template can ONLY process the variables listed, var_c and var_n, flag and bigflag. Without GENERIC you do not have a "reusable" column. And, if you do use GENERIC, then you will need a DATA step program in order to send your columns to the TABLE template. And, if you ARE using a DATA step program in order to set the values for FLAG and BIGFLAG, then you do have an opportunity to know EXACTLY how many columns you have, what the columns are.&lt;BR /&gt;
 &lt;BR /&gt;
With PROC REPORT, the new SPANROWS option would make the cell for Charlemagne span the 2 rows for var_n -- without an interior divider line. Then the style attribute vjust=m would center the name on the line as shown in the example below:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html file="C:\temp\html_output_j.html" style=journal;&lt;BR /&gt;
ods rtf file="C:\temp\rtf_output_j.rtf" style=journal;&lt;BR /&gt;
                    &lt;BR /&gt;
proc report data=test1 spanrows nowd;&lt;BR /&gt;
  title 'Show SPANROWS with JOURNAL style';&lt;BR /&gt;
  column var_c var_n ;&lt;BR /&gt;
  define var_c / order style(column)={vjust=m};&lt;BR /&gt;
  define var_n / sum;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                &lt;BR /&gt;
cynthia</description>
    <pubDate>Tue, 20 Jul 2010 14:06:58 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-07-20T14:06:58Z</dc:date>
    <item>
      <title>proc template with SAS 9.2,  issue between RTF and HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46262#M6044</link>
      <description>Hello dear SAS users,&lt;BR /&gt;
I do not understand why i do not have the same type of dataset reporting between RTF and HTML for the following exemple.&lt;BR /&gt;
Have you an idea to correct it ?&lt;BR /&gt;
What i want it's the dataset reporting like RTF do.&lt;BR /&gt;
&lt;BR /&gt;
data test1;&lt;BR /&gt;
var_c="CHARLEMAGNE";&lt;BR /&gt;
var_n=1.52;&lt;BR /&gt;
flag=0;&lt;BR /&gt;
bigflag=1;&lt;BR /&gt;
output;&lt;BR /&gt;
var_c="CHARLEMAGNE";&lt;BR /&gt;
var_n=1.35;&lt;BR /&gt;
flag=1;&lt;BR /&gt;
bigflag=1;&lt;BR /&gt;
output;&lt;BR /&gt;
var_c="louis XIV";&lt;BR /&gt;
var_n=1.52;&lt;BR /&gt;
flag=0;&lt;BR /&gt;
bigflag=1;&lt;BR /&gt;
output;&lt;BR /&gt;
var_c="louis XIV";&lt;BR /&gt;
var_n=1.35;&lt;BR /&gt;
flag=1;&lt;BR /&gt;
bigflag=1;&lt;BR /&gt;
output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
 define table summer  ;&lt;BR /&gt;
  column var_c var_n flag bigflag;   &lt;BR /&gt;
    cellstyle flag=1 as  { borderbottomcolor=black  borderbottomstyle=double }, &lt;BR /&gt;
           	  flag=0 as  { borderbottomcolor=black};&lt;BR /&gt;
&lt;BR /&gt;
  define var_c;header=_label_;just=c;vjust = c; id;			&lt;BR /&gt;
               cellstyle bigflag=1 as {borderbottomcolor=black   borderbottomstyle=double},&lt;BR /&gt;
                         bigflag=0 as {borderbottomcolor=black} ;      &lt;BR /&gt;
                blank_internal_dups;	&lt;BR /&gt;
                translate _val_ eq .   into "---" , _val_ eq "" into "---" ,compress(_val_) eq "."   into "---";&lt;BR /&gt;
  end;&lt;BR /&gt;
  define var_n;	header=_label_;just=c;vjust = c; end;&lt;BR /&gt;
   define flag; print=no; end;&lt;BR /&gt;
   define bigflag; print=no; end; &lt;BR /&gt;
  balance=on;&lt;BR /&gt;
  center=on; &lt;BR /&gt;
  justify=on;	&lt;BR /&gt;
  classlevels;	&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods html file="C:\html_output.html";&lt;BR /&gt;
ods rtf file="C:\rtf_output.rtf";&lt;BR /&gt;
data _null_ ;&lt;BR /&gt;
  set  test1;&lt;BR /&gt;
  file print ods=(template='summer');&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your help.</description>
      <pubDate>Fri, 09 Jul 2010 11:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46262#M6044</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-09T11:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: proc template with SAS 9.2,  issue between RTF and HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46263#M6045</link>
      <description>Monpe&lt;BR /&gt;
&lt;BR /&gt;
add    style=minimal  and both destinations will produce the same  results&lt;BR /&gt;
&lt;BR /&gt;
The differences are comming from the style &lt;BR /&gt;
&lt;BR /&gt;
HTH &lt;BR /&gt;
Andre</description>
      <pubDate>Fri, 09 Jul 2010 12:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46263#M6045</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2010-07-09T12:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc template with SAS 9.2,  issue between RTF and HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46264#M6046</link>
      <description>Hi:&lt;BR /&gt;
  Perhaps style=minimal will give you the results you desire. However, I suspect that you mean something else when you say that you do not have the same kind of reporting between RTF and HTML. I suspect that you might be referring to the look and feel of the interior table lines in the output.&lt;BR /&gt;
 &lt;BR /&gt;
  If I look at the data from your program, I see the presence of the FLAG and the BIGFLAG variables:&lt;BR /&gt;
[pre]&lt;BR /&gt;
           Obs       var_c       var_n    flag    bigflag&lt;BR /&gt;
                       &lt;BR /&gt;
            1     CHARLEMAGNE     1.52      0        1&lt;BR /&gt;
            2     CHARLEMAGNE     1.35      1        1&lt;BR /&gt;
            3     louis XIV       1.52      0        1&lt;BR /&gt;
            4     louis XIV       1.35      1        1&lt;BR /&gt;
  &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
and, then in your TABLE template, you have 2 CELLSTYLE...AS statements that seem to be trying to alter the border bottom based on the values of either FLAG or BIGFLAG values:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc template;&lt;BR /&gt;
   define table summer ;&lt;BR /&gt;
   column var_c var_n flag bigflag; &lt;BR /&gt;
   cellstyle flag=1 as { borderbottomcolor=black borderbottomstyle=double }, &lt;BR /&gt;
             flag=0 as { borderbottomcolor=black};&lt;BR /&gt;
                             &lt;BR /&gt;
define var_c;&lt;BR /&gt;
  header=_label_;&lt;BR /&gt;
  just=c;&lt;BR /&gt;
  vjust = c;&lt;BR /&gt;
  id; &lt;BR /&gt;
  cellstyle bigflag=1 as {borderbottomcolor=black borderbottomstyle=double},&lt;BR /&gt;
            bigflag=0 as {borderbottomcolor=black} ; &lt;BR /&gt;
   blank_internal_dups; &lt;BR /&gt;
   translate _val_ eq . into "---" , &lt;BR /&gt;
             _val_ eq "" into "---",&lt;BR /&gt;
             compress(_val_) eq "." into "---";&lt;BR /&gt;
end;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                          &lt;BR /&gt;
Also not sure what your TRANSLATE is doing since your data does not have any missing values for var_c -- but that's another issue.&lt;BR /&gt;
 &lt;BR /&gt;
I generally find that interior table lines are the hardest style attribute to change amongst the various destinations, because each destination interprets table borders and cell borders a bit differently than the other destinations.So, for example, if I do this -- without the influence of a TABLE template and only change border color and border width, compare how the different destinations use the different border colors. I would expect this same type of variation with different destinations and border styles (such as double or single).&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html file='border.html' style=sasweb;&lt;BR /&gt;
ods pdf file='border.pdf';&lt;BR /&gt;
ods rtf file='border.rtf';&lt;BR /&gt;
              &lt;BR /&gt;
proc report data=sashelp.class(obs=2) nowd&lt;BR /&gt;
   style(report)={borderbottomcolor=cyan borderbottomwidth=5&lt;BR /&gt;
                  bordertopcolor=yellow bordertopwidth=5&lt;BR /&gt;
                  borderleftcolor=magenta borderleftwidth=5&lt;BR /&gt;
                  borderrightcolor=black borderrightwidth=5};&lt;BR /&gt;
                    &lt;BR /&gt;
  title "1) REPORT: borderbottomcolor= and borderbottomwidth";&lt;BR /&gt;
  column name age height;&lt;BR /&gt;
  define name / style(column)={borderbottomcolor=red borderbottomwidth=5&lt;BR /&gt;
                               bordertopcolor=green bordertopwidth=5&lt;BR /&gt;
                               borderleftcolor=blue borderleftwidth=5&lt;BR /&gt;
                               borderrightcolor=pink borderrightwidth=5};&lt;BR /&gt;
run;&lt;BR /&gt;
                   &lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 09 Jul 2010 22:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46264#M6046</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-07-09T22:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc template with SAS 9.2,  issue between RTF and HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46265#M6047</link>
      <description>Hello,&lt;BR /&gt;
Thank you for yours answers but&lt;BR /&gt;
1) if i add style=minimal, it changes nothing to my problem&lt;BR /&gt;
2) cynthia, you're right for the ..translate ..into.. but that changes also nothingto my problem&lt;BR /&gt;
I cannot use proc report because i don't know exactly what the columns are and their number.&lt;BR /&gt;
What i want in output for my dataset is&lt;BR /&gt;
a) for the two first lines, "charlemagne" in the midle of the two lines and corresponding to these two lines, the two values of var_n (1.52 and 1.35)&lt;BR /&gt;
b) for the line 3 and 4, the same but with "louis XIV" for the column var_c in the midle of the line 3 and 4&lt;BR /&gt;
i just want no separation for the column var_c between line 1 and 2 and between lines 3and 4. &lt;BR /&gt;
&lt;BR /&gt;
In RTF, eveything goes right ( i have what i want) but that not the way for HTML output !!&lt;BR /&gt;
Why ?&lt;BR /&gt;
Thank you</description>
      <pubDate>Tue, 20 Jul 2010 09:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46265#M6047</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-20T09:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: proc template with SAS 9.2,  issue between RTF and HTML</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46266#M6048</link>
      <description>Hi:&lt;BR /&gt;
  Some comments. I don't know why RTF and HTML are different. I suspect it has something to do with Microsoft's interpretation and rendering of the various border style attributes. With Microsoft Word, Microsoft can render as they want. With Internet Explorer, Microsoft must still stick with the W3C specs for rendering tables in a browser. If you want to know the WHY, you'll have to work with Tech Support. HTML and RTF are just different destinations and inherently contain some differences -- some more immediate and obvious (HTML output can be as wide as it needs to be; while RTF is controlled by the physical margin size and orientation) and some more subtle and not obvious until you try the same thing in both destinations (as my bordercolor program illustrated).&lt;BR /&gt;
 &lt;BR /&gt;
  If you run the program I posted with the colorful borders, you will see a difference in the way that RTF and HTML both rendered the colors on each "side" of the NAME cell. If you take that experiment a step further and get rid of borderwidth on NAME, but change the border style, again, you will see different results:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html file='border.html' style=sasweb;&lt;BR /&gt;
ods pdf file='border.pdf';&lt;BR /&gt;
ods rtf file='border.rtf';&lt;BR /&gt;
                    &lt;BR /&gt;
proc report data=sashelp.class(obs=2) nowd&lt;BR /&gt;
   style(report)={borderbottomcolor=cyan borderbottomwidth=5&lt;BR /&gt;
                  bordertopcolor=yellow bordertopwidth=5&lt;BR /&gt;
                  borderleftcolor=magenta borderleftwidth=5&lt;BR /&gt;
                  borderrightcolor=black borderrightwidth=5};&lt;BR /&gt;
                       &lt;BR /&gt;
  title "1) REPORT: borderbottomcolor= and borderbottomstyle";&lt;BR /&gt;
  column name age height;&lt;BR /&gt;
  define name / style(column)={borderbottomcolor=black borderbottomstyle=double &lt;BR /&gt;
                               bordertopcolor=green bordertopwidth=5&lt;BR /&gt;
                               borderleftcolor=blue borderleftwidth=5&lt;BR /&gt;
                               borderrightcolor=pink borderrightwidth=5};&lt;BR /&gt;
run;&lt;BR /&gt;
                             &lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                               &lt;BR /&gt;
I am only pointing out that the rendering is DIFFERENT between HTML and RTF. I do not believe it is possible to make a single TABLE template or a single STYLE template with style attribute changes that will render the same in both destinations. In fact, I don't know whether it is even possible for HTML to render the same way as the RTF file. Again, that is a question for Tech Support.&lt;BR /&gt;
 &lt;BR /&gt;
Another comment. You said that: &lt;B&gt;I cannot use proc report because i don't know exactly what the columns are and their number.&lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
Your table template does not use GENERIC -- so right now, your TABLE template can ONLY process the variables listed, var_c and var_n, flag and bigflag. Without GENERIC you do not have a "reusable" column. And, if you do use GENERIC, then you will need a DATA step program in order to send your columns to the TABLE template. And, if you ARE using a DATA step program in order to set the values for FLAG and BIGFLAG, then you do have an opportunity to know EXACTLY how many columns you have, what the columns are.&lt;BR /&gt;
 &lt;BR /&gt;
With PROC REPORT, the new SPANROWS option would make the cell for Charlemagne span the 2 rows for var_n -- without an interior divider line. Then the style attribute vjust=m would center the name on the line as shown in the example below:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html file="C:\temp\html_output_j.html" style=journal;&lt;BR /&gt;
ods rtf file="C:\temp\rtf_output_j.rtf" style=journal;&lt;BR /&gt;
                    &lt;BR /&gt;
proc report data=test1 spanrows nowd;&lt;BR /&gt;
  title 'Show SPANROWS with JOURNAL style';&lt;BR /&gt;
  column var_c var_n ;&lt;BR /&gt;
  define var_c / order style(column)={vjust=m};&lt;BR /&gt;
  define var_n / sum;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 20 Jul 2010 14:06:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-template-with-SAS-9-2-issue-between-RTF-and-HTML/m-p/46266#M6048</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-07-20T14:06:58Z</dc:date>
    </item>
  </channel>
</rss>

