<?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 in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51321#M14083</link>
    <description>HI&lt;BR /&gt;
a1       a2     a3      date         amt&lt;BR /&gt;
9072  0300 8000 01/23/2009 50000&lt;BR /&gt;
9072  0700 5000 02/07/2009 60000&lt;BR /&gt;
9072  0700 5000 02/08/2009 70000&lt;BR /&gt;
9072  0800 9000 02/24/2009 67000&lt;BR /&gt;
9072  0800 9000 02/25/2009 75000&lt;BR /&gt;
9072  0100 4000 03/27/2009 45000&lt;BR /&gt;
9072  0100 4000 03/28/2009 69000&lt;BR /&gt;
9072  0700 5000 04/14/2009 75000&lt;BR /&gt;
9072  0700 5000 04/15/2009 37670&lt;BR /&gt;
&lt;BR /&gt;
and i need the output as shown below&lt;BR /&gt;
&lt;BR /&gt;
a1	a2	a3	date	amont&lt;BR /&gt;
9072	300	8000	1/23/2009	50000&lt;BR /&gt;
				&lt;BR /&gt;
9072	700	5000	2/7/2009	60000&lt;BR /&gt;
9072	700	5000	2/8/2009	70000&lt;BR /&gt;
                                                              ..............&lt;BR /&gt;
			total	130000&lt;BR /&gt;
9072	800	9000	2/24/2009	67000&lt;BR /&gt;
9072	800	9000	2/25/2009	75000&lt;BR /&gt;
                                                             ...................&lt;BR /&gt;
			total	142000&lt;BR /&gt;
9072	100	4000	3/27/2009	45000&lt;BR /&gt;
9072	100	4000	3/28/2009	69000&lt;BR /&gt;
                                                            .......................&lt;BR /&gt;
			total	114000&lt;BR /&gt;
9072	700	5000	4/14/2009	75000&lt;BR /&gt;
9072	700	5000	4/15/2009	37670&lt;BR /&gt;
                                                                ...............&lt;BR /&gt;
			 total	112670&lt;BR /&gt;
so am using proc report for this &lt;BR /&gt;
but plz suggest some solution</description>
    <pubDate>Fri, 03 Jul 2009 11:49:58 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-07-03T11:49:58Z</dc:date>
    <item>
      <title>Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51321#M14083</link>
      <description>HI&lt;BR /&gt;
a1       a2     a3      date         amt&lt;BR /&gt;
9072  0300 8000 01/23/2009 50000&lt;BR /&gt;
9072  0700 5000 02/07/2009 60000&lt;BR /&gt;
9072  0700 5000 02/08/2009 70000&lt;BR /&gt;
9072  0800 9000 02/24/2009 67000&lt;BR /&gt;
9072  0800 9000 02/25/2009 75000&lt;BR /&gt;
9072  0100 4000 03/27/2009 45000&lt;BR /&gt;
9072  0100 4000 03/28/2009 69000&lt;BR /&gt;
9072  0700 5000 04/14/2009 75000&lt;BR /&gt;
9072  0700 5000 04/15/2009 37670&lt;BR /&gt;
&lt;BR /&gt;
and i need the output as shown below&lt;BR /&gt;
&lt;BR /&gt;
a1	a2	a3	date	amont&lt;BR /&gt;
9072	300	8000	1/23/2009	50000&lt;BR /&gt;
				&lt;BR /&gt;
9072	700	5000	2/7/2009	60000&lt;BR /&gt;
9072	700	5000	2/8/2009	70000&lt;BR /&gt;
                                                              ..............&lt;BR /&gt;
			total	130000&lt;BR /&gt;
9072	800	9000	2/24/2009	67000&lt;BR /&gt;
9072	800	9000	2/25/2009	75000&lt;BR /&gt;
                                                             ...................&lt;BR /&gt;
			total	142000&lt;BR /&gt;
9072	100	4000	3/27/2009	45000&lt;BR /&gt;
9072	100	4000	3/28/2009	69000&lt;BR /&gt;
                                                            .......................&lt;BR /&gt;
			total	114000&lt;BR /&gt;
9072	700	5000	4/14/2009	75000&lt;BR /&gt;
9072	700	5000	4/15/2009	37670&lt;BR /&gt;
                                                                ...............&lt;BR /&gt;
			 total	112670&lt;BR /&gt;
so am using proc report for this &lt;BR /&gt;
but plz suggest some solution</description>
      <pubDate>Fri, 03 Jul 2009 11:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51321#M14083</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-07-03T11:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51322#M14084</link>
      <description>Recommend searching the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website for SAS-hosted REPORT Procedure documentation and also technical/conference papers on this type of topic -- here is a Google advanced search argument to consider for some matches:&lt;BR /&gt;
&lt;BR /&gt;
proc report subtotal site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 03 Jul 2009 14:17:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51322#M14084</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-07-03T14:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51323#M14085</link>
      <description>Hi:&lt;BR /&gt;
  PROC REPORT uses ORDER or GROUP variables to determine WHERE you can put your break in the final report. Based on your input data and your desired output, I'm having a hard time figuring out what the criteria are for when the break and summary should happen:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
 a1   a2   a3     date     amt&lt;BR /&gt;
9072 0300 8000 01/23/2009 50000&lt;BR /&gt;
------------------------------- you show a break here&lt;BR /&gt;
9072 0700 5000 02/07/2009 60000&lt;BR /&gt;
9072 0700 5000 02/08/2009 70000&lt;BR /&gt;
------------------------------- you show a break here&lt;BR /&gt;
9072 0800 9000 02/24/2009 67000&lt;BR /&gt;
9072 0800 9000 02/25/2009 75000&lt;BR /&gt;
------------------------------- you show a break here&lt;BR /&gt;
9072 0100 4000 03/27/2009 45000&lt;BR /&gt;
9072 0100 4000 03/28/2009 69000&lt;BR /&gt;
------------------------------- you show a break here&lt;BR /&gt;
9072 0700 5000 04/14/2009 75000&lt;BR /&gt;
9072 0700 5000 04/15/2009 37670&lt;BR /&gt;
------------------------------- you show a break here&lt;BR /&gt;
           &lt;BR /&gt;
[/pre]&lt;BR /&gt;
  &lt;BR /&gt;
At first, I thought the breaks were only by date, but perhaps the break should occur on unique combinations of a1, a2 and a3 for each month??? for each month/year?? And then you want a sub-total line that summarizes the AMT variable???&lt;BR /&gt;
 &lt;BR /&gt;
One issue I see with what you want to do is that for the first line of data:&lt;BR /&gt;
[pre]&lt;BR /&gt;
9072 0300 8000 01/23/2009 50000&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                  &lt;BR /&gt;
it looks like you want the summary line suppressed because there is no summary under this line in your desired output. PROC REPORT will not suppress summary lines if you only have 1 line of detail. (there is no workaround for this issue)&lt;BR /&gt;
&lt;BR /&gt;
Another issue will be that you show A1, A2, A3 repeated on every line of your output and if they are ORDER or GROUP variables, PROC REPORT would normally suppress the repetitious display or ORDER or GROUP variables, when values repeat. (using COMPUTED variables or other techniques, there is a workaround for this issue).&lt;BR /&gt;
&lt;BR /&gt;
  There are workarounds for some of these issues. If you follow scott's advice and look for proc report examples, you can find out how to accomplish this report with PROC REPORT. &lt;BR /&gt;
 &lt;BR /&gt;
Otherwise, this is the kind of report you can can get from PROC REPORT (shown below). If you need to suppress or not show the total line when there is only 1 line of detail ( as you show in your desired output), then you may want to move to DATA step techniques to produce this report.&lt;BR /&gt;
               &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
                 &lt;BR /&gt;
  a1        a2        a3              date     Amount&lt;BR /&gt;
  9072      0300      8000      01/23/2009      50000&lt;BR /&gt;
                                            ---------&lt;BR /&gt;
                                                50000&lt;BR /&gt;
                      &lt;BR /&gt;
  9072      0700      5000      02/07/2009      60000&lt;BR /&gt;
  9072      0700      5000      02/08/2009      70000&lt;BR /&gt;
                                            ---------&lt;BR /&gt;
                                               130000&lt;BR /&gt;
                &lt;BR /&gt;
  9072      0800      9000      02/24/2009      67000&lt;BR /&gt;
  9072      0800      9000      02/25/2009      75000&lt;BR /&gt;
                                            ---------&lt;BR /&gt;
                                               142000&lt;BR /&gt;
                    &lt;BR /&gt;
  9072      0100      4000      03/27/2009      45000&lt;BR /&gt;
  9072      0100      4000      03/28/2009      69000&lt;BR /&gt;
                                            ---------&lt;BR /&gt;
                                               114000&lt;BR /&gt;
           &lt;BR /&gt;
  9072      0700      5000      04/14/2009      75000&lt;BR /&gt;
  9072      0700      5000      04/15/2009      37670&lt;BR /&gt;
                                            ---------&lt;BR /&gt;
                                               112670&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 03 Jul 2009 16:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51323#M14085</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-07-03T16:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51324#M14086</link>
      <description>Hi &lt;BR /&gt;
&lt;BR /&gt;
sorry for late reply............u showed some output below in your reply..........thata is the output am exactly rreferring to................so can u please send me the code..........i tried by using group and order but am not able to get exact output.............so can u send me the code plz&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
kumar</description>
      <pubDate>Thu, 09 Jul 2009 10:39:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51324#M14086</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-07-09T10:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51325#M14087</link>
      <description>Hi:&lt;BR /&gt;
  To make PROC REPORT break where you want,  if I were going to solve this, I would create a new variable to be used only to control the break processing. Instead of trying to control breaking by A1, A2, A3 and date, I'd make one variable to control break processing.&lt;BR /&gt;
 &lt;BR /&gt;
  In my program, I call this new variable SUPERORD and it is the concatenation of the values for A1, A2, A3, month and year. Then, I use the SUPERORD variable in my REPORT code as the ORDER variable and use BREAK AFTER SUPERORD to get the summary line on the report after each unique value of SUPERORD.&lt;BR /&gt;
&lt;BR /&gt;
  In the code below, SUPERORD is created when I read the raw data lines. However, it could just as easily be created right before the report step with a data step program: &lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
  set your_dataset_here;&lt;BR /&gt;
  mm = put(month(date),z2.);&lt;BR /&gt;
  year = put(year(date),4.);&lt;BR /&gt;
  superord = catt(a1,a2,a3,mm,year);&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                 &lt;BR /&gt;
                    &lt;BR /&gt;
  At any rate, the program below is the one that produced the output in my previous post. To see what the SUPERORD variable looks like, either do a PROC PRINT before the PROC REPORT step or remove the NOPRINT option from the PROC REPORT DEFINE statement for SUPERORD.&lt;BR /&gt;
              &lt;BR /&gt;
cynthia&lt;BR /&gt;
                          &lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
  length superord $18;&lt;BR /&gt;
  infile datalines;&lt;BR /&gt;
  input a1 $ a2 $ a3 $ date : mmddyy10. amt;&lt;BR /&gt;
  mm = put(month(date),z2.);&lt;BR /&gt;
  year = put(year(date),4.);&lt;BR /&gt;
  superord = catt(a1,a2,a3,mm,year);&lt;BR /&gt;
return;&lt;BR /&gt;
datalines;&lt;BR /&gt;
9072 0300 8000 01/23/2009 50000&lt;BR /&gt;
9072 0700 5000 02/07/2009 60000&lt;BR /&gt;
9072 0700 5000 02/08/2009 70000&lt;BR /&gt;
9072 0800 9000 02/24/2009 67000&lt;BR /&gt;
9072 0800 9000 02/25/2009 75000&lt;BR /&gt;
9072 0100 4000 03/27/2009 45000&lt;BR /&gt;
9072 0100 4000 03/28/2009 69000&lt;BR /&gt;
9072 0700 5000 04/14/2009 75000&lt;BR /&gt;
9072 0700 5000 04/15/2009 37670&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
                                                                              &lt;BR /&gt;
title; footnote;&lt;BR /&gt;
ods listing ;&lt;BR /&gt;
ods html file='c:\temp\superord.html' style=sasweb;&lt;BR /&gt;
proc report data=test nowd;&lt;BR /&gt;
  column superord a1 a2 a3 date amt;&lt;BR /&gt;
  define superord / order order=data noprint;&lt;BR /&gt;
  define a1 /display;&lt;BR /&gt;
  define a2 / display;&lt;BR /&gt;
  define a3 / display;&lt;BR /&gt;
  define date/ f=mmddyy10. display;&lt;BR /&gt;
  define amt / sum 'Amount';&lt;BR /&gt;
  break after superord / summarize ol;&lt;BR /&gt;
  compute after superord;&lt;BR /&gt;
    line ' ';&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
 &lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 09 Jul 2009 14:34:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-report/m-p/51325#M14087</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-07-09T14:34:04Z</dc:date>
    </item>
  </channel>
</rss>

