<?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 Format/Style to modify gridlines in Proc Tabulate in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436812#M20385</link>
    <description>&lt;P&gt;I have been tasked with outputting data processed in SAS to Word documents, to which the recipients have provided examples of how they would like the output tables to look. I have been using ods tagsets.rtf to create the Word output so far mostly with success, however I've run into a snag that has been hard to search for a solution to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output I need is a proc tabulate table, and the desired format is to have gridlines around all of the classes/headers, but only column gridlines for the data. The example provided does not have row gridlines for the row class or the data rows. Using a style template, I was able to produce the appropriate gridlines around the elements on top of the proc tabulate, however the row headers also have gridlines which I do not desire. I tried using style options on the class itself but this didn't work in adding nor in removing gridlines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is a screengrab with boxes highlighting the gridlines I would like to remove, and my code is below. For a bonus, if anyone knows if I can get "State" in the screengrab centered at the bottom of the box instead of full center that would help as well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my template for the style, followed by the ods and proc tabulate snippet: :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
  define style Styles.smaller;
    parent = styles.rtf;
    style Table from output / borderspacing=0 Rules=cols;
    style header from headersandfooters / background=white borderbottomwidth=1pt;
  end;
run;

ods tagsets.rtf file="&amp;amp;something.doc"
                style=styles.smaller startpage=now;

proc tabulate data=ppwfps2;
  class state;
  class a b c / DESCENDING;
  var v;
  table state=' ', (a=' ')*(b=' ')*(c=' ')*v=' '
        / BOX='State';
  keylabel sum = ' '; *Remove sum label from table.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Feb 2018 19:03:29 GMT</pubDate>
    <dc:creator>jhowdy</dc:creator>
    <dc:date>2018-02-13T19:03:29Z</dc:date>
    <item>
      <title>Format/Style to modify gridlines in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436812#M20385</link>
      <description>&lt;P&gt;I have been tasked with outputting data processed in SAS to Word documents, to which the recipients have provided examples of how they would like the output tables to look. I have been using ods tagsets.rtf to create the Word output so far mostly with success, however I've run into a snag that has been hard to search for a solution to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output I need is a proc tabulate table, and the desired format is to have gridlines around all of the classes/headers, but only column gridlines for the data. The example provided does not have row gridlines for the row class or the data rows. Using a style template, I was able to produce the appropriate gridlines around the elements on top of the proc tabulate, however the row headers also have gridlines which I do not desire. I tried using style options on the class itself but this didn't work in adding nor in removing gridlines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is a screengrab with boxes highlighting the gridlines I would like to remove, and my code is below. For a bonus, if anyone knows if I can get "State" in the screengrab centered at the bottom of the box instead of full center that would help as well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my template for the style, followed by the ods and proc tabulate snippet: :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
  define style Styles.smaller;
    parent = styles.rtf;
    style Table from output / borderspacing=0 Rules=cols;
    style header from headersandfooters / background=white borderbottomwidth=1pt;
  end;
run;

ods tagsets.rtf file="&amp;amp;something.doc"
                style=styles.smaller startpage=now;

proc tabulate data=ppwfps2;
  class state;
  class a b c / DESCENDING;
  var v;
  table state=' ', (a=' ')*(b=' ')*(c=' ')*v=' '
        / BOX='State';
  keylabel sum = ' '; *Remove sum label from table.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Feb 2018 19:03:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436812#M20385</guid>
      <dc:creator>jhowdy</dc:creator>
      <dc:date>2018-02-13T19:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Format/Style to modify gridlines in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436848#M20387</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; When I run a version of your code that uses SASHELP.PRDSALE, this is what I get:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="use_template_smaller.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18502iF23BA98D77FAAB0F/image-size/large?v=v2&amp;amp;px=999" role="button" title="use_template_smaller.png" alt="use_template_smaller.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I am running SAS 9.4 M3 version. To me, this looks very like what you posted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 20:12:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436848#M20387</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-02-13T20:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Format/Style to modify gridlines in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436856#M20388</link>
      <description>&lt;P&gt;That looks exactly like what I'm getting, but I would like to remove the horizontal gridlines between the country names in that example. After some more digging, I found I could remove these using classlev / style ={borderbottomwidth=0pt}, however the very last row in the table doesn't have a line so there is a gap in the outer border of the whole table just underneath the final row of data. Not the most elegant solution but it's close!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(Right now it looks similar to the example you posted, however the horizontal lines are gone beneath the cells containing the country names. I would like the one underneath U.S.A. that is removed back, there's a hole in the table!)&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 20:42:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436856#M20388</guid>
      <dc:creator>jhowdy</dc:creator>
      <dc:date>2018-02-13T20:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Format/Style to modify gridlines in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436869#M20389</link>
      <description>&lt;P&gt;Without data can't get better but you can use a format to adjust classlev appearance options:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format library=work;
value cbottom
'U.S.A' = 2pt
other   = 0pt
;
run;

/* in tabulate*/
classlev country /style=(borderbottomwidth=cbottom.);&lt;/PRE&gt;
&lt;P&gt;Obviously this may involve trial an error with your data as you did not provide any examples of your variable types or values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 20:57:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436869#M20389</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-02-13T20:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Format/Style to modify gridlines in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436886#M20391</link>
      <description>&lt;P&gt;Thank you! This did the trick after specifying the character format $cbottom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I apologize for the lack of example, I had this screenshot attached as a pdf. Just noticed the photo button. &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="states.png" style="width: 374px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18505iB11FAEAB15FEB2DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="states.png" alt="states.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:24:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Format-Style-to-modify-gridlines-in-Proc-Tabulate/m-p/436886#M20391</guid>
      <dc:creator>jhowdy</dc:creator>
      <dc:date>2018-02-13T21:24:21Z</dc:date>
    </item>
  </channel>
</rss>

