<?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: cellwidth and asis options in PROC REPORT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862944#M340890</link>
    <description>Hi: No solution because the original problem is not clear to me. You want to have both leading and trailing spaces respected, but you also want to control the cellwidth to 5" and the font size to 10pt. I can't really visualize what you want because there's only 1 line of "data" in your initial program. And it doesn't really look like data to me, it looks like text strings. How do you envision being able to see the leading and trailing spaces in a line that wraps to a cellwidth of 5"? I would need to see more lines of output and some example of what you expect to get or what you want.&lt;BR /&gt;Cynthia</description>
    <pubDate>Wed, 08 Mar 2023 13:58:33 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2023-03-08T13:58:33Z</dc:date>
    <item>
      <title>cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862776#M340798</link>
      <description>&lt;P&gt;I have output which has some leading and trailing spaces. I preserved it using asis= option. It's working but I also want to reduce the width of column (basically wrapping text). When I am using&amp;nbsp;&lt;CODE class=""&gt;cellwidth=5in asis=ON]&lt;/CODE&gt;&amp;nbsp;it is not considering cellwidth= option. I understand asis= is trying to show it as-is. I am not creating HTML file, only want to show output in RESULTS window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data outdata;
  infile datalines;
  input;
  output = _infile_;
  datalines;
                                         This is a long line of data with leading and trailing space                                          
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc report data=outdata ;
column output;
define output / display style(column)=[cellwidth=5in fontsize=10pt asis=ON];
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 06:51:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862776#M340798</guid>
      <dc:creator>deepanshu88us0</dc:creator>
      <dc:date>2023-03-08T06:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862790#M340804</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/155304"&gt;@deepanshu88us0&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to be clear the asis=ON option preserves leading space but not trailing space. I tried your code with this example data, and the cellwidth= seems to be working as expected. Can you provide example data that reproduces the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data outdata;
  infile datalines;
  input;
  output = _infile_;
  datalines;
                                         This is a long line of data with leading and trailing space                                          
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mtnbikerjoshua_0-1678220798949.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81174i4129311D7907D42F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mtnbikerjoshua_0-1678220798949.png" alt="mtnbikerjoshua_0-1678220798949.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 20:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862790#M340804</guid>
      <dc:creator>mtnbikerjoshua</dc:creator>
      <dc:date>2023-03-07T20:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862795#M340807</link>
      <description>&lt;P&gt;It's not working..Not throwing error but not making changes.. Try with&amp;nbsp;&lt;CODE class=""&gt;cellwidth=1in&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc report data=outdata ;
column output;
define output / display style(column)=[cellwidth=1in fontsize=10pt asis=ON];
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note : I am using SAS Studio&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="deepanshu88us0_0-1678221748548.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81175iEC8BC4D5EA0337D4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="deepanshu88us0_0-1678221748548.png" alt="deepanshu88us0_0-1678221748548.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 20:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862795#M340807</guid>
      <dc:creator>deepanshu88us0</dc:creator>
      <dc:date>2023-03-07T20:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862858#M340829</link>
      <description>Just FYI, unless you change the options, the RESULT window in SAS Studio is showing you HTML output. So in fact, you ARE using HTML.I believe the default is HTML5.&lt;BR /&gt;Cynthia</description>
      <pubDate>Wed, 08 Mar 2023 02:45:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862858#M340829</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-03-08T02:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862861#M340831</link>
      <description>&lt;P&gt;Thanks. any solution to the original problem?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 05:30:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862861#M340831</guid>
      <dc:creator>deepanshu88us0</dc:creator>
      <dc:date>2023-03-08T05:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862874#M340836</link>
      <description>&lt;P&gt;Seems to be a bug -&amp;nbsp;&lt;A href="https://support.sas.com/kb/15/617.html" target="_blank"&gt;https://support.sas.com/kb/15/617.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 07:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862874#M340836</guid>
      <dc:creator>deepanshu88us0</dc:creator>
      <dc:date>2023-03-08T07:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862910#M340860</link>
      <description>/*&lt;BR /&gt;Try option:&lt;BR /&gt;1)indent=0.5in&lt;BR /&gt;or&lt;BR /&gt;2)pretext='      '&lt;BR /&gt;*/&lt;BR /&gt;data outdata;&lt;BR /&gt;  infile datalines;&lt;BR /&gt;  input;&lt;BR /&gt;  output = _infile_;&lt;BR /&gt;  datalines;&lt;BR /&gt;This is a long line of data with leading and trailing space                                          &lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc report data=outdata nowd;&lt;BR /&gt;column output;&lt;BR /&gt;define output / display style(column)=[cellwidth=1in fontsize=10pt indent=0.5in];&lt;BR /&gt;run;</description>
      <pubDate>Wed, 08 Mar 2023 11:50:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862910#M340860</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-03-08T11:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862937#M340884</link>
      <description>&lt;P&gt;Thanks. Identation is not consistent in my dataset.. Some obs may have larger identation than others, some may not even have any.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 13:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862937#M340884</guid>
      <dc:creator>deepanshu88us0</dc:creator>
      <dc:date>2023-03-08T13:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862944#M340890</link>
      <description>Hi: No solution because the original problem is not clear to me. You want to have both leading and trailing spaces respected, but you also want to control the cellwidth to 5" and the font size to 10pt. I can't really visualize what you want because there's only 1 line of "data" in your initial program. And it doesn't really look like data to me, it looks like text strings. How do you envision being able to see the leading and trailing spaces in a line that wraps to a cellwidth of 5"? I would need to see more lines of output and some example of what you expect to get or what you want.&lt;BR /&gt;Cynthia</description>
      <pubDate>Wed, 08 Mar 2023 13:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/862944#M340890</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-03-08T13:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/863012#M340907</link>
      <description>&lt;P&gt;Based on that bug report, it seems like your best bet would be to upgrade SAS if that is possible. If you can't, then one possible workaround is to make the first character of the string something that SAS doesn't recognize as a space. For instance, you could&amp;nbsp;put a zero width space at the beginning of the string:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data outdata;
  infile datalines;
  input;
  output = _infile_;
  datalines;
^{unicode 0200B}                                       This is a long line of data with leading and trailing space                                          
;
run;

ods escapechar='^';

proc report data=outdata ;&lt;BR /&gt;  column output;&lt;BR /&gt;  define output / display style(column)=[cellwidth=5in fontsize=10pt];&lt;BR /&gt;run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Mar 2023 15:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/863012#M340907</guid>
      <dc:creator>mtnbikerjoshua</dc:creator>
      <dc:date>2023-03-08T15:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: cellwidth and asis options in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/896152#M354078</link>
      <description>&lt;P&gt;I like the style indent approach, especially since 1) it does not pad the value, which matters when another programmer must Validate the data sets, 2) if wrapping occurs the value does not start at the left most, but rather back at the margin, and 3) one can use logic in a COMPUTE block to apply it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-RTF-and-the-REPORT-procedure-break-on-space-not-word/m-p/328300#M17819" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-RTF-and-the-REPORT-procedure-break-on-space-not-word/m-p/328300#M17819&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Specifically, I use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;compute row_1 ;
   if row_order_1 &amp;gt; 0
   then call define ( _col_
                    , "style"
                    , "style = { leftmargin = 1% }"
                    ) ;

endcomp ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 19:37:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cellwidth-and-asis-options-in-PROC-REPORT/m-p/896152#M354078</guid>
      <dc:creator>KevinViel</dc:creator>
      <dc:date>2023-09-27T19:37:34Z</dc:date>
    </item>
  </channel>
</rss>

