<?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: Sub Header for totals in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-Header-for-totals/m-p/71217#M8170</link>
    <description>Can you use ASCII art to show what you want the table to look like?  If you use the&lt;BR /&gt;
preformatted output tags (pre and /pre, both enclosed in square brackets), you can do&lt;BR /&gt;
something like the below TABULATE output:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
   -----------------------------------------------------------------------&lt;BR /&gt;
   |                 |                        Age                        |&lt;BR /&gt;
   |                 |---------------------------------------------------|&lt;BR /&gt;
   |                 |           13            |           14            |&lt;BR /&gt;
   |                 |-------------------------+-------------------------|&lt;BR /&gt;
   |                 |         Height          |         Height          |&lt;BR /&gt;
   |                 |-------------------------+-------------------------|&lt;BR /&gt;
   |                 |    Sum     |    Mean    |    Sum     |    Mean    |&lt;BR /&gt;
   |-----------------+------------+------------+------------+------------|&lt;BR /&gt;
   |Sex              |            |            |            |            |&lt;BR /&gt;
   |-----------------|            |            |            |            |&lt;BR /&gt;
   |F                |      121.80|       60.90|      127.10|       63.55|&lt;BR /&gt;
   |-----------------+------------+------------+------------+------------|&lt;BR /&gt;
   |M                |       62.50|       62.50|      132.50|       66.25|&lt;BR /&gt;
   |-----------------+------------+------------+------------+------------|&lt;BR /&gt;
   |All              |      184.30|       61.43|      259.60|       64.90|&lt;BR /&gt;
   -----------------------------------------------------------------------&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
-- David Kelley, SAS</description>
    <pubDate>Tue, 27 Jan 2009 15:13:30 GMT</pubDate>
    <dc:creator>David_SAS</dc:creator>
    <dc:date>2009-01-27T15:13:30Z</dc:date>
    <item>
      <title>Sub Header for totals</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-Header-for-totals/m-p/71216#M8169</link>
      <description>I have a list of totals that are split across a table by regions.&lt;BR /&gt;
&lt;BR /&gt;
These totals conosists of recruitment and attrition figures and are broken down into 3 categories each.&lt;BR /&gt;
&lt;BR /&gt;
Is it possible to have a sub header for all the recruitment totals - 'Recruitment' and similar for the attrition totals - 'Attrition'.&lt;BR /&gt;
&lt;BR /&gt;
Also these in bold and set a bit to the left would be nice....&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Mon, 26 Jan 2009 13:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-Header-for-totals/m-p/71216#M8169</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-26T13:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sub Header for totals</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-Header-for-totals/m-p/71217#M8170</link>
      <description>Can you use ASCII art to show what you want the table to look like?  If you use the&lt;BR /&gt;
preformatted output tags (pre and /pre, both enclosed in square brackets), you can do&lt;BR /&gt;
something like the below TABULATE output:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
   -----------------------------------------------------------------------&lt;BR /&gt;
   |                 |                        Age                        |&lt;BR /&gt;
   |                 |---------------------------------------------------|&lt;BR /&gt;
   |                 |           13            |           14            |&lt;BR /&gt;
   |                 |-------------------------+-------------------------|&lt;BR /&gt;
   |                 |         Height          |         Height          |&lt;BR /&gt;
   |                 |-------------------------+-------------------------|&lt;BR /&gt;
   |                 |    Sum     |    Mean    |    Sum     |    Mean    |&lt;BR /&gt;
   |-----------------+------------+------------+------------+------------|&lt;BR /&gt;
   |Sex              |            |            |            |            |&lt;BR /&gt;
   |-----------------|            |            |            |            |&lt;BR /&gt;
   |F                |      121.80|       60.90|      127.10|       63.55|&lt;BR /&gt;
   |-----------------+------------+------------+------------+------------|&lt;BR /&gt;
   |M                |       62.50|       62.50|      132.50|       66.25|&lt;BR /&gt;
   |-----------------+------------+------------+------------+------------|&lt;BR /&gt;
   |All              |      184.30|       61.43|      259.60|       64.90|&lt;BR /&gt;
   -----------------------------------------------------------------------&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
-- David Kelley, SAS</description>
      <pubDate>Tue, 27 Jan 2009 15:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-Header-for-totals/m-p/71217#M8170</guid>
      <dc:creator>David_SAS</dc:creator>
      <dc:date>2009-01-27T15:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sub Header for totals</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-Header-for-totals/m-p/71218#M8171</link>
      <description>mikeymay &lt;BR /&gt;
&lt;BR /&gt;
also very helpful would be a data step to load some sample data. (I would like to help, and think I can help, but with neither sample input not sample layout, most effort would be wasted &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Wed, 28 Jan 2009 16:12:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-Header-for-totals/m-p/71218#M8171</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-28T16:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sub Header for totals</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-Header-for-totals/m-p/71219#M8172</link>
      <description>Another thing to consider is that you can use SASHELP files, like SASHELP.SHOES or SASHELP.PRDSALE or SASHELP.CLASS to try to come up with a structure that you like and -then- the only thing that needs to be posted is the code and possibly a snippet of the output that you want to change. For example, if I use this PROC REPORT program on SASHELP.SHOES:&lt;BR /&gt;
[pre]&lt;BR /&gt;
options nodate nonumber nocenter;&lt;BR /&gt;
                     &lt;BR /&gt;
proc report data=sashelp.shoes nowd;&lt;BR /&gt;
  where region in ('Asia', 'Africa', 'Canada')&lt;BR /&gt;
        and product contains 'Dress';&lt;BR /&gt;
  column region product sales;&lt;BR /&gt;
  define region /group;&lt;BR /&gt;
  define product / group;&lt;BR /&gt;
  define sales / sum;&lt;BR /&gt;
  break after region / summarize;&lt;BR /&gt;
  compute after region;&lt;BR /&gt;
    line ' ';&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                               &lt;BR /&gt;
I get this output:&lt;BR /&gt;
[pre]&lt;BR /&gt;
  Region                     Product          Total Sales&lt;BR /&gt;
  Africa                     Men's Dress         $318,500&lt;BR /&gt;
                             Women's Dress       $374,308&lt;BR /&gt;
  Africa                                         $692,808&lt;BR /&gt;
                             &lt;BR /&gt;
  Asia                       Men's Dress         $119,366&lt;BR /&gt;
                             Women's Dress        $78,234&lt;BR /&gt;
  Asia                                           $197,600&lt;BR /&gt;
                        &lt;BR /&gt;
  Canada                     Men's Dress         $920,101&lt;BR /&gt;
                             Women's Dress       $989,350&lt;BR /&gt;
  Canada                                       $1,909,451&lt;BR /&gt;
                                                            &lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                             &lt;BR /&gt;
Note how the region name is repeated on the summary line. If I wanted to CHANGE what appears on the summary line, perhaps instead of Asia, &lt;BR /&gt;
I want to see Attrition Sum on the summary line:&lt;BR /&gt;
[pre]&lt;BR /&gt;
  Region                     Product          Total Sales&lt;BR /&gt;
  Africa                     Men's Dress         $318,500&lt;BR /&gt;
                             Women's Dress       $374,308&lt;BR /&gt;
  Africa                                         $692,808&lt;BR /&gt;
                      &lt;BR /&gt;
  Asia                       Men's Dress         $119,366&lt;BR /&gt;
                             Women's Dress        $78,234&lt;BR /&gt;
  Attrition Sum                                  $197,600&lt;BR /&gt;
                      &lt;BR /&gt;
  Canada                     Men's Dress         $920,101&lt;BR /&gt;
                             Women's Dress       $989,350&lt;BR /&gt;
  Recruitment Sum                              $1,909,451&lt;BR /&gt;
                             &lt;BR /&gt;
[/pre]&lt;BR /&gt;
            &lt;BR /&gt;
That is possible with a COMPUTE block in PROC REPORT. But, maybe you're using PROC TABULATE or PROC SQL -- without any idea of what &lt;BR /&gt;
procedure you're trying to use or what your table structure looks like, it's very hard to come up with anything helpful.&lt;BR /&gt;
         &lt;BR /&gt;
cynthia&lt;BR /&gt;
&lt;BR /&gt;
code that created last output is below&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc report data=sashelp.shoes nowd;&lt;BR /&gt;
  where region in ('Asia', 'Africa', 'Canada')&lt;BR /&gt;
        and product contains 'Dress';&lt;BR /&gt;
  column region product sales;&lt;BR /&gt;
  define region /group;&lt;BR /&gt;
  define product / group;&lt;BR /&gt;
  define sales / sum;&lt;BR /&gt;
  break after region / summarize;&lt;BR /&gt;
  compute before region;&lt;BR /&gt;
    holdreg = region;&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  compute after region;&lt;BR /&gt;
    if holdreg = 'Asia' then region = 'Attrition Sum';&lt;BR /&gt;
    else if holdreg = 'Canada' then region = 'Recruitment Sum';&lt;BR /&gt;
    line ' ';&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 28 Jan 2009 16:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-Header-for-totals/m-p/71219#M8172</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-01-28T16:39:34Z</dc:date>
    </item>
  </channel>
</rss>

