<?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 _Proc tabulate_text wrapping in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/413691#M19865</link>
    <description>I really appreciate your help.&lt;BR /&gt;Yes, I am using SAS/IntrNet. Thanks for remaindering different ods html style, I choose ODS MSOFFICE2K at end. It works good.&lt;BR /&gt;I also check background html code for ODS HTML3, I find SAS makes ODS HTML3 default to leave first and last column blank in the header cell. I only have four columns(very often, often,sometime, never) here, so the title only occupy the middle two columns(often and sometime). if i change it to six columns(eg: always,very often, often, sometime, occasionally,never), so the title can spread to four middle columns(very often, often, sometime, occasionally), it still leaves first and last column blank(always, never),but it won’t looks so strange wrapping.&lt;BR /&gt;Summary all line is used to add color to the bottom line.&lt;BR /&gt;Thanks.</description>
    <pubDate>Wed, 15 Nov 2017 15:32:12 GMT</pubDate>
    <dc:creator>XiaoGuaiShou</dc:creator>
    <dc:date>2017-11-15T15:32:12Z</dc:date>
    <item>
      <title>ods html _Proc tabulate_text wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/411300#M19811</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello SAS people,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I made a table with proc tabulate in ods html, it works well in sas base, but the title is wrapping together in ods html(I use excel to do an example to show my problem in orange circle). I am not sure if&amp;nbsp;anyone have some idea to solve this problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" border="0" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;SPAN&gt;The table I want( title spreading out):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper"&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/16480iD45F25B8C0C7CFB8/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/i/smilies/16x16_smiley-indifferent.png" border="0" alt="Smiley Indifferent" title="Smiley Indifferent" /&gt;&lt;SPAN&gt;The table I have(title wrapping):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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/16481i4E7B8D49D0034146/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper"&gt;&lt;I&gt;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; Code I use:&lt;/I&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have;
   infile datalines dlm=',';
   informat cat finished 8.  Question $20. ;
   input cat finished Question ;
datalines;
1 ,1,Very often
1 ,1,Never
2 ,1,often
3 ,1,Sometimes
3 ,1,Very often
3 ,1,often 
4 ,1,Never 
5 ,1,Sometimes

;
run; 
data have;
  set have;
  label question	='bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla';
run;

/*ODS HTML3 body=_webout  (no_top_matter no_bottom_matter)  path=&amp;amp;_tmpcat (url=&amp;amp;_replay) rs=none stylesheet=(URL="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css");
*/
	proc tabulate data =have style = [just=c vjust=m ];
		    class Question/  order=internal  &amp;amp;ascending preloadfmt;
			var finished;
			class cat/ order=formatted preloadfmt;
			classlev cat / style = [cellwidth=135];
			keylabel all='Total';
			
		table cat='' all={S = {background = #E7E6D5}}*{S = {background = #E7E6D5 /*cellwidth=70*/}}
		,finished='Respondents'*n=''*f=comma10.  question*(rowpctn=''*f=pct. )/ box={label="Group" s=[just=L ]} ;
	run;
/*ods html3 close;
	ods listing;*/&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 18:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/411300#M19811</guid>
      <dc:creator>XiaoGuaiShou</dc:creator>
      <dc:date>2017-11-07T18:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: ods html _Proc tabulate_text wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/411420#M19813</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I'm curious why you're using HTML3, however, your code looks like something that used to be submitted to the Application Dispatcher in SAS/IntrNet days. When I change your code to use ODS HTML instead of ODS HTML3, I see only 2 lines for the label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I am not sure why you have this in the code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;table cat='' all={S = {background = #E7E6D5}}*{S = {background = #E7E6D5 /*cellwidth=70*/}}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That is not how to apply a style to the summary ALL line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; When you have this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data =have style = [just=c vjust=m ];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you are only "touching" the data cells in the table -- the data cells are the cells underneath the column header and to the right of the row header area. So the vjust=m that you have here will NOT have any impact on your header values for Cat, Respondents or Questions -- so if you want vjust=m for the header cells you need to do it in&amp;nbsp;the&amp;nbsp;VAR,&amp;nbsp;CLASS and/or CLASSLEV statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The table you show as what you currently get, looks like it is restricting the label for QUESTION header cell to the 2 header cells in the middle of your 4 levels. That seems odd to me and worth opening a track with Tech Support about. I'd suggest trying other ODS destinations, like ODS HTML4, ODS MSOFFICE2K and/or ODS HTML5. Since ODS HTML3 was basically the first ODS written for version 7/8, it seems likely to me that later versions of HTML destinations might treat the header cell differently.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 03:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/411420#M19813</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-11-08T03:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: ods html _Proc tabulate_text wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/411559#M19818</link>
      <description>&lt;P&gt;Value of the macro variable &amp;amp;ascending?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The formats involved that you are using Preloadfmt with.&lt;/P&gt;
&lt;P&gt;Since they aren't referenced in the proc tabulate code we have to assume that you have them assigned to the variables permanently.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also your Preloadfmt won't work as&lt;/P&gt;
&lt;P&gt;PreloadFmt will have no effect on the output without one of the following options:&lt;/P&gt;
&lt;P&gt;"printmiss", "order=data", or the class statement option "exclusive".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you show a mean column not referenced in the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do know that running your data set without any specific ods options in SAS 9.4 I do not get the heading as you display but in the desired order.&lt;/P&gt;
&lt;P&gt;There could also be something in that style sheet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW:&lt;/P&gt;
&lt;PRE&gt;data have;
  set have;
  label question	='bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla';
run;

&lt;/PRE&gt;
&lt;P&gt;Isn't the best approach. Add the label statement in the code that reads the data or use Proc Data sets. Using a data step to add labels or formats can add significant CPU usage when used with large data sets. Better:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
   infile datalines dlm=',';
   informat cat finished 8.  Question $20. ;
   input cat finished Question ;
   label question	='bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla';

datalines;
1 ,1,Very often
1 ,1,Never
2 ,1,often
3 ,1,Sometimes
3 ,1,Very often
3 ,1,often 
4 ,1,Never 
5 ,1,Sometimes

;
run; &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 15:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/411559#M19818</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-08T15:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: ods html _Proc tabulate_text wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/413684#M19864</link>
      <description>Thanks the suggestion about using a data step to add labels or formats. It do can add significant CPU usage when used with large data sets and save a lot of running time. Thanks.</description>
      <pubDate>Wed, 15 Nov 2017 15:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/413684#M19864</guid>
      <dc:creator>XiaoGuaiShou</dc:creator>
      <dc:date>2017-11-15T15:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: ods html _Proc tabulate_text wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/413691#M19865</link>
      <description>I really appreciate your help.&lt;BR /&gt;Yes, I am using SAS/IntrNet. Thanks for remaindering different ods html style, I choose ODS MSOFFICE2K at end. It works good.&lt;BR /&gt;I also check background html code for ODS HTML3, I find SAS makes ODS HTML3 default to leave first and last column blank in the header cell. I only have four columns(very often, often,sometime, never) here, so the title only occupy the middle two columns(often and sometime). if i change it to six columns(eg: always,very often, often, sometime, occasionally,never), so the title can spread to four middle columns(very often, often, sometime, occasionally), it still leaves first and last column blank(always, never),but it won’t looks so strange wrapping.&lt;BR /&gt;Summary all line is used to add color to the bottom line.&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 15 Nov 2017 15:32:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ods-html-Proc-tabulate-text-wrapping/m-p/413691#M19865</guid>
      <dc:creator>XiaoGuaiShou</dc:creator>
      <dc:date>2017-11-15T15:32:12Z</dc:date>
    </item>
  </channel>
</rss>

