<?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: Problem using compute in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-using-compute/m-p/4544#M1460</link>
    <description>Hi: &lt;BR /&gt;
See this forum posting:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=1853&amp;amp;tstart=0" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=1853&amp;amp;tstart=0&lt;/A&gt;&lt;BR /&gt;
cynthia</description>
    <pubDate>Thu, 06 Sep 2007 15:47:07 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2007-09-06T15:47:07Z</dc:date>
    <item>
      <title>Problem using compute</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-using-compute/m-p/4541#M1457</link>
      <description>How do I get Customised Total labels as you showed in your last post.&lt;BR /&gt;
I tried compute but doesnt work. &lt;BR /&gt;
&lt;BR /&gt;
Group is on Supplier and then on Branch&lt;BR /&gt;
So the total label of Group and Branch should be as &lt;BR /&gt;
TOTAL of &lt;BRANCH name=""&gt; :  100&lt;BR /&gt;
&lt;BR /&gt;
After supplier group break it should be &lt;BR /&gt;
TOTAL of &lt;SUPPLIER name=""&gt; :  1000&lt;BR /&gt;
&lt;BR /&gt;
And after all suppliers &lt;BR /&gt;
&lt;BR /&gt;
GRAND TOTAL :    10000&lt;BR /&gt;
&lt;BR /&gt;
Please&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc report data=WORK.QUERY3051 nowd headskip COLWIDTH=5&lt;BR /&gt;
	style(summary)=Header;&lt;BR /&gt;
	by Pi_In_Supplier Cf_Su_Name;&lt;BR /&gt;
	title j=l 'SUPPLIER : #byval(Pi_In_Supplier)      #byval(Cf_Su_Name)';&lt;BR /&gt;
	&lt;BR /&gt;
	column  Pi_In_Supplier 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;
&lt;BR /&gt;
&lt;BR /&gt;
 	define Pi_In_Supplier / group noprint ;&lt;BR /&gt;
	define Cf_Su_Name / group noprint ;&lt;BR /&gt;
	define Gb_Br_Name / 'Branch' group flow width=20;&lt;BR /&gt;
	define Pi_In_Grnno / 'Internal GRN No';&lt;BR /&gt;
	define Pi_In_Grn / 'Supplier GRN No';&lt;BR /&gt;
	define Pi_In_Orderno / 'Order No' group ;&lt;BR /&gt;
	define Pi_In_Ordtype / 'Order Type' 	flow width=5;&lt;BR /&gt;
	define Pi_In_Partno / 'Product Code'	flow width=10;&lt;BR /&gt;
	define Pi_In_Grndate / 'Date Goods Received' group;&lt;BR /&gt;
	define Pi_In_Recqty / 'Quantity Received' SUM ;&lt;BR /&gt;
	define Pi_In_Recgoods / 'Net Goods Value' SUM ;&lt;BR /&gt;
	define Pi_In_Recprice / 'Net Purchase Cost' SUM	;&lt;BR /&gt;
&lt;BR /&gt;
	break after Pi_In_Supplier /summarize skip ul ol;&lt;BR /&gt;
	break after Gb_Br_Name /summarize skip ul ol;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;/SUPPLIER&gt;&lt;/BRANCH&gt;</description>
      <pubDate>Wed, 05 Sep 2007 10:05:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-using-compute/m-p/4541#M1457</guid>
      <dc:creator>SanjayM</dc:creator>
      <dc:date>2007-09-05T10:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using compute</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-using-compute/m-p/4542#M1458</link>
      <description>Hi,&lt;BR /&gt;
 This 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;&lt;BR /&gt;
showed how to change the text at the summary line.&lt;BR /&gt;
&lt;BR /&gt;
The PROC REPORT documentation talks about how PROC REPORT processes from left to right. So if you want to have this computation for newvar:&lt;BR /&gt;
[pre]&lt;BR /&gt;
comput newvar;&lt;BR /&gt;
  newvar = var2.sum + var4.sum;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Then you have to place newvar3 AFTER var4:&lt;BR /&gt;
[pre]&lt;BR /&gt;
column var1 var2 newvar var4;   &amp;lt; ---- WRONG&lt;BR /&gt;
column var1 var2 var4 newvar; &amp;lt; --- RIGHT&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
This same concept applies to a COMPUTE block...if you have this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
column grpvar var1 var2 var4 newvar ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
And, if grpvar is a NOPRINT variable, then the variable you need to change at the summary line is the VAR1 variable "slot" or cell.&lt;BR /&gt;
&lt;BR /&gt;
For more help with PROC REPORT syntax and making the changes you want, you might consider contacting Tech Support.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 05 Sep 2007 16:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-using-compute/m-p/4542#M1458</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-05T16:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using compute</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-using-compute/m-p/4543#M1459</link>
      <description>Hello,&lt;BR /&gt;
I dont want to compute new column but i want to customize my sub totals and Grand totals.&lt;BR /&gt;
So how should i go ahaed doing that,my code is given below.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
options nobyline nocenter;&lt;BR /&gt;
&lt;BR /&gt;
proc report data=WORK.QUERY3051 nowd split='*' colwidth=20 spacing=2 headskip;&lt;BR /&gt;
	&lt;BR /&gt;
	by Pi_In_Supplier Gb_Br_Name ;&lt;BR /&gt;
	&lt;BR /&gt;
		title1	    '                               Supplier Report                 '    ;&lt;BR /&gt;
				title2  'SUPPLIER : #byval(Pi_In_Supplier)      '    ;&lt;BR /&gt;
&lt;BR /&gt;
	column  Pi_In_Supplier 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;
&lt;BR /&gt;
&lt;BR /&gt;
 	define Pi_In_Supplier / group noprint width=20;&lt;BR /&gt;
	*define Cf_Su_Name / group noprint ;&lt;BR /&gt;
	define Gb_Br_Name / 'Branch' group flow width=20;&lt;BR /&gt;
	define Pi_In_Grnno / 'Internal GRN No ' ;&lt;BR /&gt;
	define Pi_In_Grn / 'Supplier GRN No' ;&lt;BR /&gt;
	define Pi_In_Orderno / 'Order No' order ;&lt;BR /&gt;
	define Pi_In_Ordtype / 'Order Type' 	flow width=5;&lt;BR /&gt;
	define Pi_In_Partno / 'Product Code'	flow width=10;&lt;BR /&gt;
	define Pi_In_Grndate / 'Date Goods Received' 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;
	&lt;BR /&gt;
	break after Pi_In_Supplier /summarize skip ul ol;&lt;BR /&gt;
	rbreak after / ol ul summarize;&lt;BR /&gt;
	*break after Gb_Br_Name /summarize skip ul ol;&lt;BR /&gt;
	&lt;BR /&gt;
	compute after Pi_In_Supplier;&lt;BR /&gt;
	Pi_In_Supplier= Pi_In_Supplier || 'sub Total';&lt;BR /&gt;
	&lt;BR /&gt;
	endcomp;&lt;BR /&gt;
	&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Using this code I am not able to display subtotal for each supplier and grand total for each supplier .</description>
      <pubDate>Thu, 06 Sep 2007 10:21:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-using-compute/m-p/4543#M1459</guid>
      <dc:creator>SanjayM</dc:creator>
      <dc:date>2007-09-06T10:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using compute</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-using-compute/m-p/4544#M1460</link>
      <description>Hi: &lt;BR /&gt;
See this forum posting:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=1853&amp;amp;tstart=0" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=1853&amp;amp;tstart=0&lt;/A&gt;&lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 06 Sep 2007 15:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-using-compute/m-p/4544#M1460</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-06T15:47:07Z</dc:date>
    </item>
  </channel>
</rss>

