<?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/484768#M71847</link>
    <description>&lt;P&gt;hi! Currently, I am trying to use PROC REPORT to product a report that contains a grand totals row at the bottom (sum of each column). First, I created a table containing the data using PROC SQL:&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table tbl_AP as&lt;BR /&gt;&amp;nbsp;select&lt;BR /&gt;&amp;nbsp;&amp;nbsp;Grl,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;count(PI) as Total,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;count (AR) as Inis&lt;BR /&gt;from w.empWFA&lt;BR /&gt;&amp;nbsp;where OCP= 3&lt;BR /&gt;&amp;nbsp;group by Grl;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Then, I used PROC REPORT to create the report, specifically using RBBREAK to get the grand totals:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;proc report data= tbl_AP&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;headline headskip;&lt;BR /&gt;&amp;nbsp;Title1 "Distribution of People ";&lt;BR /&gt;&amp;nbsp;column Grl Total Inis;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;define Grl / group 'Gp-LV';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;define Total / display;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;define Inis / display;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;rbreak after /summarize;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everytime, I run this program, I get 0 errors or warnings. The table with the proper titles and labels appear, however there is never a totals row at the bottom. Instead, just an empty row at the bottom. Could anyone provide any insight on where my code is wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 07 Aug 2018 14:42:33 GMT</pubDate>
    <dc:creator>JibJam221</dc:creator>
    <dc:date>2018-08-07T14:42:33Z</dc:date>
    <item>
      <title>PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT/m-p/484768#M71847</link>
      <description>&lt;P&gt;hi! Currently, I am trying to use PROC REPORT to product a report that contains a grand totals row at the bottom (sum of each column). First, I created a table containing the data using PROC SQL:&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table tbl_AP as&lt;BR /&gt;&amp;nbsp;select&lt;BR /&gt;&amp;nbsp;&amp;nbsp;Grl,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;count(PI) as Total,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;count (AR) as Inis&lt;BR /&gt;from w.empWFA&lt;BR /&gt;&amp;nbsp;where OCP= 3&lt;BR /&gt;&amp;nbsp;group by Grl;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Then, I used PROC REPORT to create the report, specifically using RBBREAK to get the grand totals:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;proc report data= tbl_AP&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;headline headskip;&lt;BR /&gt;&amp;nbsp;Title1 "Distribution of People ";&lt;BR /&gt;&amp;nbsp;column Grl Total Inis;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;define Grl / group 'Gp-LV';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;define Total / display;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;define Inis / display;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;rbreak after /summarize;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everytime, I run this program, I get 0 errors or warnings. The table with the proper titles and labels appear, however there is never a totals row at the bottom. Instead, just an empty row at the bottom. Could anyone provide any insight on where my code is wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2018 14:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT/m-p/484768#M71847</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2018-08-07T14:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT/m-p/484793#M71848</link>
      <description>HI:&lt;BR /&gt;  Read about PROC REPORT usage. Essentially, when you put "DISPLAY" as the usage (after the / in the DEFINE statement), you turned off any numbers on the summary line. Change the DISPLAY to SUM for TOTAL and INIS and the RBREAK will show you numbers.&lt;BR /&gt; &lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 07 Aug 2018 15:29:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT/m-p/484793#M71848</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-08-07T15:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT/m-p/484795#M71849</link>
      <description>&lt;P&gt;hi Cynthia! This worked perfectly, thanks! Now, is there any way for me to label the final row as "grand total"? The Grl column is not numerical, and contains characters. I was hoping to put the grand total label at the end of this column, followed by the computed totals of the other two columns (inis and Total).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2018 15:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT/m-p/484795#M71849</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2018-08-07T15:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT/m-p/484819#M71853</link>
      <description>Hi:&lt;BR /&gt;  Yes, but you need a COMPUTE block for that. You also have to be sure that your GRL variable is wide enough to hold the string "Grand Total" (11 characters). For example, if GRL is only 2 characters wide, then you would only be able to fit 'Gr' on the summary line by default and would have to use other methods of placing Grand Total. Look at this previous forum posting &lt;A href="https://communities.sas.com/t5/SAS-Procedures/Grand-Total/td-p/49481" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Grand-Total/td-p/49481&lt;/A&gt; for an example. &lt;BR /&gt;&lt;BR /&gt;And for more advanced COMPUTE block examples, here's a paper: &lt;A href="https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf&lt;/A&gt; that might be of interest.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 07 Aug 2018 16:38:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT/m-p/484819#M71853</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-08-07T16:38:48Z</dc:date>
    </item>
  </channel>
</rss>

