<?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: character num. of proc report column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/character-num-of-proc-report-column/m-p/949828#M371509</link>
    <description>&lt;P&gt;From the documentation of the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0wy1vqwvz43uhn1g77eb5xlvzqh.htm#n01pmu2pvogfywn1xw4r5lex16q9" target="_blank" rel="noopener"&gt;WIDTH=&lt;/A&gt;&amp;nbsp;option of the DEFINE statement:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-restriction"&gt;Restriction&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;This option has no effect on ODS destinations other than LISTING output. For ODS destinations, use the STYLE= option with the WIDTH= style attribute or the CELLWIDTH= style attribute. Refer to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/de/pgmsascdc/9.4_3.5/odsadvug/n0otdo2g12obp3n0zmnghcn7p4vu.htm" target="_blank"&gt;Style Attributes Tables&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xisDoc-xrefBookTitle"&gt;SAS Output Delivery System: Advanced Topics&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for details. See how style attributes WIDTH= and CELLWIDTH= can be used with PROC REPORT in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/de/pgmsascdc/9.4_3.5/proc/p1sh52tpsi1nxbn1sr371jj0bngj.htm#p1sh52tpsi1nxbn1sr371jj0bngj" target="_blank"&gt;Using the CELLWIDTH= Style Attribute with PROC REPORT&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Mon, 04 Nov 2024 11:00:28 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-11-04T11:00:28Z</dc:date>
    <item>
      <title>character num. of proc report column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-num-of-proc-report-column/m-p/949823#M371508</link>
      <description>&lt;P&gt;I want to achieve this effect in the image in RTF (the column width is set to 4 characters, and the line will wrap when it is reached). Please check whether my width is set incorrectly.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="17307148294013.png" style="width: 774px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101950iAC6EFFA52787D9F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="17307148294013.png" alt="17307148294013.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;ods rtf file="xxx\test.rtf" style=rtf;

proc report data = sashelp.cars;
        column make model;
        define make / width=4;
        define model / width=4;
run;
ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Nov 2024 10:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-num-of-proc-report-column/m-p/949823#M371508</guid>
      <dc:creator>Bill3</dc:creator>
      <dc:date>2024-11-04T10:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: character num. of proc report column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-num-of-proc-report-column/m-p/949828#M371509</link>
      <description>&lt;P&gt;From the documentation of the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0wy1vqwvz43uhn1g77eb5xlvzqh.htm#n01pmu2pvogfywn1xw4r5lex16q9" target="_blank" rel="noopener"&gt;WIDTH=&lt;/A&gt;&amp;nbsp;option of the DEFINE statement:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-restriction"&gt;Restriction&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;This option has no effect on ODS destinations other than LISTING output. For ODS destinations, use the STYLE= option with the WIDTH= style attribute or the CELLWIDTH= style attribute. Refer to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/de/pgmsascdc/9.4_3.5/odsadvug/n0otdo2g12obp3n0zmnghcn7p4vu.htm" target="_blank"&gt;Style Attributes Tables&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xisDoc-xrefBookTitle"&gt;SAS Output Delivery System: Advanced Topics&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for details. See how style attributes WIDTH= and CELLWIDTH= can be used with PROC REPORT in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/de/pgmsascdc/9.4_3.5/proc/p1sh52tpsi1nxbn1sr371jj0bngj.htm#p1sh52tpsi1nxbn1sr371jj0bngj" target="_blank"&gt;Using the CELLWIDTH= Style Attribute with PROC REPORT&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 04 Nov 2024 11:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-num-of-proc-report-column/m-p/949828#M371509</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-11-04T11:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: character num. of proc report column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-num-of-proc-report-column/m-p/949853#M371516</link>
      <description>&lt;P&gt;First, it may be time to describe what the real problem that this solution addresses as it sounds very awkward at best and possibly very ugly in reality.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your PICTURE shows 1) Text for Make that is a much larger font than for Model and 2) "wraps" text for Make without affecting the line alignment for Model the first thing would likely be that MAKE be defined as a GROUP variable and use the Proc option SPANROWS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc report data = sashelp.cars spanrows;
        column make model;
        define make / group  width=4;
        define model / width=4;
run;&lt;/PRE&gt;
&lt;P&gt;If I really wanted that appearance I would never rely on a "width" setting, either number of characters or cellwidth measured widths because changes of style, fonts and such make it very hard to be consistent. I would instead be tempted to insert breaking space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also you need to consider what is the actual length of your longest value? I have to assume that you are using Sashelp.cars as an example for your data set. What if you have a long value, say up to 16 characters that would wrap to 4 lines but there are only two categories of the "Model" equivalent variable. Then you have an odd appearance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally the display width of the individual letters may become of interest. Almost all output these days uses proportional fonts and something that looks "reasonable" for some combinations of letters may not for other. Consider four wide characters compared with four skinny ones.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WWWW&lt;/P&gt;
&lt;P&gt;iiii&lt;/P&gt;
&lt;P&gt;note that the four letter i above take up less space than two letter W. So something with skinny characters may look funny displayed in the manner you suggest, wrapped at four characters, or the sequence of W might really want to be wrapped at three to maintain your appearance.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 18:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-num-of-proc-report-column/m-p/949853#M371516</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-11-04T18:15:33Z</dc:date>
    </item>
  </channel>
</rss>

