<?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 Proc Report - creating output of summary lines in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38009#M9689</link>
    <description>Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
I need to create an output report of only the summary lines created in Proc Report. What code will accomplish this?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
    <pubDate>Thu, 07 Jan 2010 16:51:54 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-01-07T16:51:54Z</dc:date>
    <item>
      <title>Proc Report - creating output of summary lines</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38009#M9689</link>
      <description>Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
I need to create an output report of only the summary lines created in Proc Report. What code will accomplish this?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 07 Jan 2010 16:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38009#M9689</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-07T16:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - creating output of summary lines</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38010#M9690</link>
      <description>Suggested Google advanced search argument to consider based on your post's topic area:&lt;BR /&gt;
&lt;BR /&gt;
proc report group summary site:sas.com</description>
      <pubDate>Thu, 07 Jan 2010 18:19:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38010#M9690</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-07T18:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - creating output of summary lines</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38011#M9691</link>
      <description>Hi Shell,&lt;BR /&gt;
&lt;BR /&gt;
do a proc summary first which returns one single row.&lt;BR /&gt;
&lt;BR /&gt;
Best regards&lt;BR /&gt;
Eva</description>
      <pubDate>Fri, 08 Jan 2010 15:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38011#M9691</guid>
      <dc:creator>Eva</dc:creator>
      <dc:date>2010-01-08T15:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - creating output of summary lines</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38012#M9692</link>
      <description>Thanks Eva,&lt;BR /&gt;
I'll try that.&lt;BR /&gt;
&lt;BR /&gt;
Shelley</description>
      <pubDate>Fri, 08 Jan 2010 18:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38012#M9692</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-08T18:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - creating output of summary lines</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38013#M9693</link>
      <description>Hi:&lt;BR /&gt;
   PROC REPORT has the ability to produce either GROUP (summary) or ORDER (detail) reports.&lt;BR /&gt;
 &lt;BR /&gt;
  For example, this code:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc report data=sashelp.shoes nowd;&lt;BR /&gt;
  column region subsidiary sales;&lt;BR /&gt;
  define region / order;&lt;BR /&gt;
  define subsidiary / order;&lt;BR /&gt;
  define sales/ sum;&lt;BR /&gt;
  break after region / summarize;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                         &lt;BR /&gt;
In the above report, I would see a detail line for every observation, ordered by region/subsidiary, with a summary line underneath every region. For example, if the dataset has 500 observations, I would have at least 500 report rows. If I have 10 regions in the data, then the detail report would also have 10 summary lines. &lt;BR /&gt;
             &lt;BR /&gt;
If I ONLY want to see the REGION information -- or 10 summary lines for each REGION, then the above code needs to drop subsidiary and change the usage for REGION to GROUP:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc report data=sashelp.shoes nowd;&lt;BR /&gt;
  column region sales;&lt;BR /&gt;
  define region / group;&lt;BR /&gt;
  define sales/ sum;&lt;BR /&gt;
  rbreak after / summarize;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
Now, I will only see the summarized sales for each region, without any detail lines coming from the subsidiary information. &lt;BR /&gt;
 &lt;BR /&gt;
Or, you could use other procedures, like PROC MEANS or PROC SQL to "pre-summarize" the data and then pass the summary info to PROC REPORT. This does, however, require 2 passes through the data -- which isn't too horrible for small to medium datasets, but really unnecessary, when PROC REPORT will do it in one step...summarizing and reporting.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 08 Jan 2010 19:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38013#M9693</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-01-08T19:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - creating output of summary lines</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38014#M9694</link>
      <description>Thank you for including details, Cynthia!</description>
      <pubDate>Mon, 11 Jan 2010 16:49:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-creating-output-of-summary-lines/m-p/38014#M9694</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-11T16:49:46Z</dc:date>
    </item>
  </channel>
</rss>

