<?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: ALIGN VALUES IN PROC REPORT OUTPUT in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719639#M24868</link>
    <description>&lt;PRE&gt;proc freq data=sashelp.heart noprint;
table Smoking_Status/out=temp;
run;
data want;
 set temp;
 length c_count $ 8 c_per $ 5;
 c_count=put(count, 8.  -r);
 c_per=put(percent, 4.1 -r);
 value=c_count||'   ('||c_per||')';
 if not missing(Smoking_Status);
run;
ods rtf file='c:\temp\x.rtf';
proc report data=want nowd style(report)={ outputwidth=100%};
define value/display style={just=right font_face=arial};
run;
ods rtf close;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Feb 2021 14:04:26 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-02-16T14:04:26Z</dc:date>
    <item>
      <title>ALIGN VALUES IN PROC REPORT OUTPUT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719623#M24867</link>
      <description>&lt;P&gt;Good day&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to align my values of the circled column on the picture below, please advise. I have attached an example of an output with proper aligned values.&amp;nbsp; I have also attached a code to be used as an example to use:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data class;&lt;/P&gt;
&lt;P&gt;set sashelp.class;&lt;/P&gt;
&lt;P&gt;height = height+.8;&lt;/P&gt;
&lt;P&gt;weight = weight+.9;&lt;/P&gt;
&lt;P&gt;if name in('Alfred' 'Carol' 'James')&lt;/P&gt;
&lt;P&gt;then do;&lt;/P&gt;
&lt;P&gt;height = 88.88;&lt;/P&gt;
&lt;P&gt;weight =77.77;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;if age=14 then count_percent=strip(put(height,6.))||'(12.13)';&lt;BR /&gt;else if age=13 then count_percent=strip(put(height,6.))||'(89.3)';&lt;BR /&gt;else count_percent=strip(put(height,6.))||'(100.00)';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods listing close;&lt;/P&gt;
&lt;P&gt;title; footnote;&lt;/P&gt;
&lt;P&gt;ods tagsets.RTF file='C:\Users\just_d.rtf';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc report data=class nowd headline headskip split='~' missing style ( report )=[frame=hsides outputwidth = 10in background = white&lt;BR /&gt;font_face='Courier New' font_size=3] &lt;BR /&gt;style(column)={just=CENTER font_face='Courier New' background=white foreground=black&lt;BR /&gt;font_size=3 cellwidth=.6in}&lt;BR /&gt;style(header)={just=center font_face='Courier New' cellheight=.8in font_size=3&lt;BR /&gt;foreground=black cellwidth=.6in&lt;BR /&gt;background=white font_style=roman vjust=t} ;&lt;/P&gt;
&lt;P&gt;column name age height weight weight=wt2 count_percent;&lt;/P&gt;
&lt;P&gt;define height / 'ht Just=c'&lt;/P&gt;
&lt;P&gt;style(column)={just=c};&lt;/P&gt;
&lt;P&gt;define weight / 'wt just=d'&lt;/P&gt;
&lt;P&gt;style(column)={just=d};&lt;/P&gt;
&lt;P&gt;define wt2 / 'wt just=d/chg margin'&lt;/P&gt;
&lt;P&gt;style(column)={just=d width=1.0in rightmargin=.25in};&lt;/P&gt;
&lt;P&gt;define count_percent / 'wt just=d/chg margin'&lt;/P&gt;
&lt;P&gt;style(column)={just=d width=1.0in rightmargin=.25in};&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;ods _all_ close;&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="Dinkepile_0-1613479519431.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54786i43C82F82BE84A18E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dinkepile_0-1613479519431.png" alt="Dinkepile_0-1613479519431.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;on the final report or output i wish the values to align like the example below:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dinkepile_1-1613479609315.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54787iEF4C16992E46B3F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dinkepile_1-1613479609315.png" alt="Dinkepile_1-1613479609315.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 12:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719623#M24867</guid>
      <dc:creator>Dinkepile</dc:creator>
      <dc:date>2021-02-16T12:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: ALIGN VALUES IN PROC REPORT OUTPUT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719639#M24868</link>
      <description>&lt;PRE&gt;proc freq data=sashelp.heart noprint;
table Smoking_Status/out=temp;
run;
data want;
 set temp;
 length c_count $ 8 c_per $ 5;
 c_count=put(count, 8.  -r);
 c_per=put(percent, 4.1 -r);
 value=c_count||'   ('||c_per||')';
 if not missing(Smoking_Status);
run;
ods rtf file='c:\temp\x.rtf';
proc report data=want nowd style(report)={ outputwidth=100%};
define value/display style={just=right font_face=arial};
run;
ods rtf close;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Feb 2021 14:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719639#M24868</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-02-16T14:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: ALIGN VALUES IN PROC REPORT OUTPUT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719713#M24869</link>
      <description>Good day&lt;BR /&gt;&lt;BR /&gt;Thanks so much for the feedback.&lt;BR /&gt;&lt;BR /&gt;It seem to work but it is not aligning proper where percent is 100. May in&lt;BR /&gt;your example if you can include a single observation which has percent&lt;BR /&gt;value 100 and see if the values in brackets will align proper?&lt;BR /&gt;&lt;BR /&gt;Kind Regards&lt;BR /&gt;Dinkepile&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Feb 2021 20:18:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719713#M24869</guid>
      <dc:creator>Dinkepile</dc:creator>
      <dc:date>2021-02-16T20:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: ALIGN VALUES IN PROC REPORT OUTPUT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719857#M24870</link>
      <description>Just try make cell width bigger.&lt;BR /&gt;&lt;BR /&gt;c_per=put(percent, 4.1 -r);&lt;BR /&gt;--&amp;gt;&lt;BR /&gt;c_per=put(percent, 5.1 -r);</description>
      <pubDate>Wed, 17 Feb 2021 11:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719857#M24870</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-02-17T11:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: ALIGN VALUES IN PROC REPORT OUTPUT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719859#M24871</link>
      <description>Thanks so much for your input.&lt;BR /&gt;&lt;BR /&gt;Kind Regards&lt;BR /&gt;Dinkepile&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Feb 2021 11:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-VALUES-IN-PROC-REPORT-OUTPUT/m-p/719859#M24871</guid>
      <dc:creator>Dinkepile</dc:creator>
      <dc:date>2021-02-17T11:03:47Z</dc:date>
    </item>
  </channel>
</rss>

