<?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: PROC REPORT/RBREAK — adding text to numeric GROUP variable in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832039#M25922</link>
    <description>&lt;P&gt;Thanks! I have a workaround where you run PROC SUMMARY to get the statistics, and then run PROC REPORT on the output of PROC SUMMARY, which honors the format on variable AGE. I know PROC SUMMARY well enough that I can get quick and correct answers with one hand tied behind my back. Also, I don't know PROC TABULATE. But, yes, a PROC REPORT answer would still be preferable.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2022 19:17:07 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-09-06T19:17:07Z</dc:date>
    <item>
      <title>PROC REPORT/RBREAK — adding text to numeric GROUP variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/831981#M25920</link>
      <description>&lt;P&gt;Suppose I create a report using PROC REPORT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.class; 
    columns age height weight;
	define age/group;
    define height/analysis mean format=10.2 "Height Mean";
    define weight/analysis mean format=10.1 "Weight Mean";
	rbreak after/summarize style=[font_style=italic];
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The report looks like this&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="PaigeMiller_0-1662481621394.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75016i826FEDA5B6A4DF86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaigeMiller_0-1662481621394.png" alt="PaigeMiller_0-1662481621394.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but I want the bottom left cell (under Age, under 16) to have the text string 'All' inserted there.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;has shown me &lt;A href="https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-can-you-place-descriptive-text-in-a-BREAK-or-RBREAK/td-p/431401" target="_self"&gt;how to do this&lt;/A&gt; if AGE is a character variable. But in this case, AGE is numeric. I have tried creating a format such that a missing is replaced by 'All' and assigning that format to age. No success. I can't get it to work when AGE is a numeric variable. Can someone tell me how? Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 16:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/831981#M25920</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-06T16:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT/RBREAK — adding text to numeric GROUP variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832035#M25921</link>
      <description>&lt;P&gt;I know you asked for REPORT and not TABULATE, but I can only figure out the answer for TABULATE.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;proc tabulate
  data=sashelp.class

;
  var height weight;
  class age / order=unformatted missing;

  table /* row dimension */
    age 
      all={style={font_style=italic}}*{style={font_style=italic}},
      /* column dimension */
    height={label="Height (mean)"}*
      mean={label=""} 
      weight={label="Weight (mean)"}*
      mean={label=""};
    ;
run;&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHemedinger_0-1662490866895.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75030i193F7BED8C80672F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHemedinger_0-1662490866895.png" alt="ChrisHemedinger_0-1662490866895.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm sure a PROC REPORT expert will chime in with something different...&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 19:01:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832035#M25921</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-09-06T19:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT/RBREAK — adding text to numeric GROUP variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832039#M25922</link>
      <description>&lt;P&gt;Thanks! I have a workaround where you run PROC SUMMARY to get the statistics, and then run PROC REPORT on the output of PROC SUMMARY, which honors the format on variable AGE. I know PROC SUMMARY well enough that I can get quick and correct answers with one hand tied behind my back. Also, I don't know PROC TABULATE. But, yes, a PROC REPORT answer would still be preferable.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 19:17:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832039#M25922</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-06T19:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT/RBREAK — adding text to numeric GROUP variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832044#M25924</link>
      <description>&lt;P&gt;I also don't know TABULATE well...but the Summary Tables task in SAS Enterprise Guide with its drag-and-drop interaction generated the code I shared. I didn't do anything to it except make it not ALL CAPS &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 19:26:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832044#M25924</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-09-06T19:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT/RBREAK — adding text to numeric GROUP variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832048#M25925</link>
      <description>&lt;P&gt;Just do the exact same thing as for the character variable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.class; 
  columns age age2 height weight;
  define age/group noprint;
  define age2 / computed 'Age';
  define height/analysis mean format=10.2 "Height Mean";
  define weight/analysis mean format=10.1 "Weight Mean";
  compute age2 / character length=5 ;
    age2=put(age,5.);
  endcomp;
  compute after ;
    age2='Total';
  endcomp;
  rbreak after/summarize style=[font_style=italic];
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1662494470768.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75033iD357D2A0BC772B79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1662494470768.png" alt="Tom_0-1662494470768.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, 06 Sep 2022 20:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832048#M25925</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-09-06T20:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT/RBREAK — adding text to numeric GROUP variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832050#M25926</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've just found this solution/workaround &lt;EM&gt;accidentally&lt;/EM&gt;&amp;nbsp;while trying various options:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.class; 
column age height weight;
define age/group mlf;
define height/analysis mean format=10.2 "Height Mean";
define weight/analysis mean format=10.1 "Weight Mean";
rbreak after/summarize style=[font_style=italic];
compute after;
  if _break_="_RBREAK_" then age="All";
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then I remembered that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp;mentioned the MLF trick earlier this year (not sure if it was &lt;A href="https://communities.sas.com/t5/SAS-Programming/Hardcoding-format-after-PROC-SUMMARY/m-p/796884/highlight/true#M255759" target="_blank" rel="noopener"&gt;this post&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Removed "&lt;FONT face="courier new,courier"&gt;format=3.&lt;/FONT&gt;" as it was redundant.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 20:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832050#M25926</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-09-06T20:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT/RBREAK — adding text to numeric GROUP variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832061#M25927</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt; . It seems like cheating to create a new column just to trick PROC REPORT into making the appearance of the output exactly what I want, but I have done it before. It seems like cheating to use the MLF option when you don't even have a multi-label format, but why not?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A slightly simpler version of the code from &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.class; 
column age height weight;
define age/group mlf;
define height/analysis mean format=10.2 "Height Mean";
define weight/analysis mean format=10.1 "Weight Mean";
rbreak after/summarize style=[font_style=italic];
compute after;
  age="All";
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Sep 2022 22:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-RBREAK-adding-text-to-numeric-GROUP-variable/m-p/832061#M25927</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-06T22:09:22Z</dc:date>
    </item>
  </channel>
</rss>

