<?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 problem in displaying customize Totals and sub totals in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/problem-in-displaying-customize-Totals-and-sub-totals/m-p/4566#M1470</link>
    <description>Want to display total for supplier name in my report.&lt;BR /&gt;
Below is the code through which i am not able to display the customize total..&lt;BR /&gt;
&lt;BR /&gt;
proc report data=WORK.QUERY3051 nowd headskip split='*' spacing=1;&lt;BR /&gt;
by Cf_Su_Name Gb_Br_Name;&lt;BR /&gt;
title2  'SUPPLIER : #byval(Cf_Su_Name)      '    ;&lt;BR /&gt;
	column Cf_Su_Name Gb_Br_Name &lt;BR /&gt;
			Pi_In_Grnno Pi_In_Grn Pi_In_Orderno Pi_In_Ordtype Pi_In_Partno &lt;BR /&gt;
			Pi_In_Grndate Pi_In_Recqty Pi_In_Recgoods Pi_In_Recprice; &lt;BR /&gt;
	define Cf_Su_Name /group  noprint order=formatted ;&lt;BR /&gt;
	define Gb_Br_Name  / group order=formatted; &lt;BR /&gt;
	define Pi_In_Orderno / order;&lt;BR /&gt;
	define Pi_In_Ordtype / 'Order*Type' 	flow width=5;&lt;BR /&gt;
	define Pi_In_Grndate / order;&lt;BR /&gt;
	define Pi_In_Recqty / 'Quantity*Received' SUM format=8.;&lt;BR /&gt;
	define Pi_In_Recgoods / 'Net*Goods*Value' SUM format=comma16.2;&lt;BR /&gt;
	define Pi_In_Recprice / 'Net*Purchase*Cost' SUM	format=comma16.2;&lt;BR /&gt;
	break after Gb_Br_Name / summarize OL skip; &lt;BR /&gt;
	rbreak after / summarize;  &lt;BR /&gt;
	compute after ;&lt;BR /&gt;
	  		Cf_Su_Name = 'Total for' || Cf_Su_Name;  &lt;BR /&gt;
 endcomp; &lt;BR /&gt;
	&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Can you modify the code to display below layout.&lt;BR /&gt;
i am displaying the report layout&lt;BR /&gt;
&lt;BR /&gt;
Supplier:xyz&lt;BR /&gt;
Branch   GRN    Order_type    date quantity value&lt;BR /&gt;
abc&lt;BR /&gt;
abc subtotal                      ---------   ---------&lt;BR /&gt;
Total for xyz                    ---------   ---------</description>
    <pubDate>Thu, 06 Sep 2007 14:37:16 GMT</pubDate>
    <dc:creator>SanjayM</dc:creator>
    <dc:date>2007-09-06T14:37:16Z</dc:date>
    <item>
      <title>problem in displaying customize Totals and sub totals</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/problem-in-displaying-customize-Totals-and-sub-totals/m-p/4566#M1470</link>
      <description>Want to display total for supplier name in my report.&lt;BR /&gt;
Below is the code through which i am not able to display the customize total..&lt;BR /&gt;
&lt;BR /&gt;
proc report data=WORK.QUERY3051 nowd headskip split='*' spacing=1;&lt;BR /&gt;
by Cf_Su_Name Gb_Br_Name;&lt;BR /&gt;
title2  'SUPPLIER : #byval(Cf_Su_Name)      '    ;&lt;BR /&gt;
	column Cf_Su_Name Gb_Br_Name &lt;BR /&gt;
			Pi_In_Grnno Pi_In_Grn Pi_In_Orderno Pi_In_Ordtype Pi_In_Partno &lt;BR /&gt;
			Pi_In_Grndate Pi_In_Recqty Pi_In_Recgoods Pi_In_Recprice; &lt;BR /&gt;
	define Cf_Su_Name /group  noprint order=formatted ;&lt;BR /&gt;
	define Gb_Br_Name  / group order=formatted; &lt;BR /&gt;
	define Pi_In_Orderno / order;&lt;BR /&gt;
	define Pi_In_Ordtype / 'Order*Type' 	flow width=5;&lt;BR /&gt;
	define Pi_In_Grndate / order;&lt;BR /&gt;
	define Pi_In_Recqty / 'Quantity*Received' SUM format=8.;&lt;BR /&gt;
	define Pi_In_Recgoods / 'Net*Goods*Value' SUM format=comma16.2;&lt;BR /&gt;
	define Pi_In_Recprice / 'Net*Purchase*Cost' SUM	format=comma16.2;&lt;BR /&gt;
	break after Gb_Br_Name / summarize OL skip; &lt;BR /&gt;
	rbreak after / summarize;  &lt;BR /&gt;
	compute after ;&lt;BR /&gt;
	  		Cf_Su_Name = 'Total for' || Cf_Su_Name;  &lt;BR /&gt;
 endcomp; &lt;BR /&gt;
	&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Can you modify the code to display below layout.&lt;BR /&gt;
i am displaying the report layout&lt;BR /&gt;
&lt;BR /&gt;
Supplier:xyz&lt;BR /&gt;
Branch   GRN    Order_type    date quantity value&lt;BR /&gt;
abc&lt;BR /&gt;
abc subtotal                      ---------   ---------&lt;BR /&gt;
Total for xyz                    ---------   ---------</description>
      <pubDate>Thu, 06 Sep 2007 14:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/problem-in-displaying-customize-Totals-and-sub-totals/m-p/4566#M1470</guid>
      <dc:creator>SanjayM</dc:creator>
      <dc:date>2007-09-06T14:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: problem in displaying customize Totals and sub totals</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/problem-in-displaying-customize-Totals-and-sub-totals/m-p/4567#M1471</link>
      <description>Hi:&lt;BR /&gt;
  Cf_Su_Name is a NOPRINT variable. So changing its value in the COMPUTE block is not going to work (as you discovered).&lt;BR /&gt;
  &lt;BR /&gt;
If you look at this previous forum posting:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=1840&amp;amp;tstart=0" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=1840&amp;amp;tstart=0&lt;/A&gt; and review and run ANY of the  Example programs, you will notice that REGION in the programs is defined as a NOPRINT variable.&lt;BR /&gt;
 &lt;BR /&gt;
So, in the COMPUTE block:&lt;BR /&gt;
[pre]&lt;BR /&gt;
compute after &lt;B&gt;region;&lt;/B&gt;&lt;BR /&gt;
    if region = 'Central America/Caribbean' then region = 'C Amer/Carib';&lt;BR /&gt;
    else if region = 'Western Europe' then region = 'W Eur';&lt;BR /&gt;
    else if region = 'Eastern Europe' then region = 'E Eur';&lt;BR /&gt;
  &lt;B&gt;  product &lt;/B&gt;= trim(region)|| ' SubTot';&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Notice that the COMPUTE block will be executed at the break for REGION, but, the report item that is being "renamed" is PRODUCT ... not REGION. Because PRODUCT is the first "visible" report item on the report.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 06 Sep 2007 15:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/problem-in-displaying-customize-Totals-and-sub-totals/m-p/4567#M1471</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-06T15:46:07Z</dc:date>
    </item>
  </channel>
</rss>

