<?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: Merging a table row with proc tabulate in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492652#M21611</link>
    <description>&lt;P&gt;Here is the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods tagsets.tableeditor file="&amp;amp;path\&amp;amp;&amp;amp;xst1.&amp;amp;CYR1YY..html"	
      options( 
               frozen_headers="yes"
               frozen_rowheaders="yes"
               banner_color_even="beige"
               banner_color_odd="white"
               header_bgcolor="teal"
			   header_fgcolor="white"
			   rowheader_bgcolor="lightblue"
               gridline_color="gray"
			   header_size="12"  
               rowheader_size="12" 
			   data_size="11" 
              );

PROC TABULATE NOSEPS MISSING FORMAT=comma7. FORMCHAR='              ' data=diswebtbldat;

CLASS STATEFIP disyr sub1;
class age_d sex race ethnic / style={background=white};

tables statefip, all*(n f=5.1*pctn&amp;lt;sub1 all&amp;gt;) 
(sex all)*(pctn&amp;lt;sex all&amp;gt;)*f=5.1 
(age_d all)*(pctn&amp;lt;age_d all&amp;gt;)*f=5.1 
(race all)*(pctn&amp;lt;race all&amp;gt;)*f=5.1 
(ethnic all)*(pctn&amp;lt;ethnic all&amp;gt;)*f=5.1, 
 all sub1 / rts=16 misstext='--' box=_page_ printmiss; 
where statefip IN (&amp;amp;st) and disyr=&amp;amp;CYR1;   

format age_d ageg. sex sex. race race. ethnic ethnic. sub1 sub. services_d dsvc. reason dreason. statefip $state.;

keylabel all='Total' n='No.' pctn='%';

run;  

ods tagsets.tableeditor close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 05 Sep 2018 13:30:18 GMT</pubDate>
    <dc:creator>martyvd</dc:creator>
    <dc:date>2018-09-05T13:30:18Z</dc:date>
    <item>
      <title>Merging a table row with proc tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492461#M21601</link>
      <description>&lt;P&gt;I am trying to merge the cells in the GENDER row together because the current HTML output is causing a screen reader to read each cell as hard coded blank space. I would like to have all vertical gridlines in that row removed and have the white background stretched all the way across.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23004i346812A51897E59F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know that I can remove the nocellmerge option but want correctly alternating row colors which it does not seem to allow (see below).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23006i20B3C2337956D71F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 19:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492461#M21601</guid>
      <dc:creator>martyvd</dc:creator>
      <dc:date>2018-09-04T19:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Merging a table row with proc tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492473#M21603</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/228746"&gt;@martyvd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am trying to merge the cells in the GENDER row together because the current HTML output is causing a screen reader to read each cell as hard coded blank space. I would like to have all vertical gridlines in that row removed and have the white background stretched all the way across.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23004i346812A51897E59F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I know that I can remove the nocellmerge option but want correctly alternating row colors which it does not seem to allow (see below).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23006i20B3C2337956D71F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since part of your requirement is alternating row colors we need to know how you are addressing row color now. The entire tabulate code would be helpful as well. You might be using other options that need to be addressed.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 20:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492473#M21603</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-04T20:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Merging a table row with proc tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492474#M21604</link>
      <description>&lt;P&gt;And if you can't use your actual data, feel free to replicate it with SASHELP.HEART or CLASS if desired.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's also many data sets available in the documentation that can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 20:35:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492474#M21604</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-04T20:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Merging a table row with proc tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492509#M21605</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The only real thing you can do is move the word "Gender" up into the BOX area, where you currently have the word Total. Consider this code and output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="row_header_extra_space_tab.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23013iDBF974196DE2475A/image-size/large?v=v2&amp;amp;px=999" role="button" title="row_header_extra_space_tab.png" alt="row_header_extra_space_tab.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 00:26:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492509#M21605</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-09-05T00:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Merging a table row with proc tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492652#M21611</link>
      <description>&lt;P&gt;Here is the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods tagsets.tableeditor file="&amp;amp;path\&amp;amp;&amp;amp;xst1.&amp;amp;CYR1YY..html"	
      options( 
               frozen_headers="yes"
               frozen_rowheaders="yes"
               banner_color_even="beige"
               banner_color_odd="white"
               header_bgcolor="teal"
			   header_fgcolor="white"
			   rowheader_bgcolor="lightblue"
               gridline_color="gray"
			   header_size="12"  
               rowheader_size="12" 
			   data_size="11" 
              );

PROC TABULATE NOSEPS MISSING FORMAT=comma7. FORMCHAR='              ' data=diswebtbldat;

CLASS STATEFIP disyr sub1;
class age_d sex race ethnic / style={background=white};

tables statefip, all*(n f=5.1*pctn&amp;lt;sub1 all&amp;gt;) 
(sex all)*(pctn&amp;lt;sex all&amp;gt;)*f=5.1 
(age_d all)*(pctn&amp;lt;age_d all&amp;gt;)*f=5.1 
(race all)*(pctn&amp;lt;race all&amp;gt;)*f=5.1 
(ethnic all)*(pctn&amp;lt;ethnic all&amp;gt;)*f=5.1, 
 all sub1 / rts=16 misstext='--' box=_page_ printmiss; 
where statefip IN (&amp;amp;st) and disyr=&amp;amp;CYR1;   

format age_d ageg. sex sex. race race. ethnic ethnic. sub1 sub. services_d dsvc. reason dreason. statefip $state.;

keylabel all='Total' n='No.' pctn='%';

run;  

ods tagsets.tableeditor close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Sep 2018 13:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492652#M21611</guid>
      <dc:creator>martyvd</dc:creator>
      <dc:date>2018-09-05T13:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Merging a table row with proc tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492676#M21614</link>
      <description>Hi:&lt;BR /&gt;  Unfortunately, since you already have BOX=_PAGE_, you couldn't use the technique shown for my #2 example unless you change the BOX= option.&lt;BR /&gt;&lt;BR /&gt;  As I explained, the "double tall" cells where you have GENDER cannot be merged across all the columns.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Wed, 05 Sep 2018 14:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492676#M21614</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-09-05T14:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Merging a table row with proc tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492688#M21615</link>
      <description>&lt;P&gt;You could try pre-calculating the numbers and using&amp;nbsp;PROC REPORT to display.&lt;/P&gt;
&lt;P&gt;Here's an example. The variable header is a single row, and obviously your data structure may need to change a bit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
infile cards truncover;
input GROUP_VAR $ brand $ Freq Freq1 COUNT;
datalines;      
SUB1 A 2 3 8
SUB1 B 3 5 4
SUB1 C 4 6 2
SUB2 D 5 1 1
SUB2 E 6 5 8
SUB2 F 7 7 9
;
run;

proc tabulate data=test;
class group_var brand / order=data missing;
var freq freq1 count;
table group_var=''*brand='', freq*sum='' freq1*sum='' count*sum=''/misstext='';
run;

proc report nowd data=test;
   col group_var brand freq freq1 count;
   define group_var / group noprint format=$8.;
   define brand/order;
   define freq/ sum;
   define freq1 / sum;
   define count / sum;
  break before group_var  / skip;
    compute before group_var/
      style={cellheight=8pt font_size=12pt just=left};
      line group_var $100.;
  endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Sep 2018 14:55:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Merging-a-table-row-with-proc-tabulate/m-p/492688#M21615</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-05T14:55:54Z</dc:date>
    </item>
  </channel>
</rss>

