<?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 getting the proper through Proc Report in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-in-getting-the-proper-through-Proc-Report/m-p/4741#M1515</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I am not getting the perfect output through proc report.&lt;BR /&gt;
&lt;BR /&gt;
Layout of my report&lt;BR /&gt;
&lt;BR /&gt;
branch name              internal Grn        External Grn  order no   Cost ... &lt;BR /&gt;
&lt;BR /&gt;
Supplier:  ACTIV-AIR AUTOMATION LTD  &lt;BR /&gt;
&lt;BR /&gt;
3010 XYZ Gloucester 123                     10000               1            1000&lt;BR /&gt;
                                                                                               --------&lt;BR /&gt;
Total for Supplier  ACTIV-AIR AUTOMATION LTD                         1000&lt;BR /&gt;
                                                                                               ---------&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End of report&lt;BR /&gt;
&lt;BR /&gt;
The problem in  this layout is that i am getting the same output but the line for total for supplier is taking the width of branch ,I wouls like to make it independent.&lt;BR /&gt;
&lt;BR /&gt;
I am sending you the code also.&lt;BR /&gt;
&lt;BR /&gt;
 options nobyline;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc report data=WORK.QUERY3051 nowd headskip split='*' spacing=1;&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;
			title1 'PTS       BM_SREP0370                                  Purchase Reserve Report BY Supplier                                      16/09/07';&lt;BR /&gt;
			title2  '                            ===================================                       ';&lt;BR /&gt;
			    &lt;BR /&gt;
	define Cf_Su_Name /group  noprint ;&lt;BR /&gt;
	define Gb_Br_Name  / group noprint ; &lt;BR /&gt;
	define Gb_Br_Name_1 /computed 'Branch Name';&lt;BR /&gt;
	define Pi_In_Grnno / order width=8;&lt;BR /&gt;
	define Pi_In_Grn / '  Supplier*   GRN No' order  width=10;&lt;BR /&gt;
	define Pi_In_Orderno / order width=10;&lt;BR /&gt;
	define Pi_In_Ordtype / 'Order*Type' 	flow width=5;&lt;BR /&gt;
	define Pi_In_Partno  / order width=8;&lt;BR /&gt;
	define Pi_In_Grndate / order width=10;&lt;BR /&gt;
	define Pi_In_Recqty / 'Quantity*Received' SUM format=8.;&lt;BR /&gt;
	define Pi_In_Recgoods / 'Net*Goods*Value' SUM format=comma8.2;&lt;BR /&gt;
	define Pi_In_Recprice / 'Net*Purchase*Cost' SUM	format=comma8.2;&lt;BR /&gt;
	rbreak after / summarize;  &lt;BR /&gt;
	compute before Cf_Su_Name;&lt;BR /&gt;
	line @2 'Supplier: ' Cf_Su_Name $25. ;&lt;BR /&gt;
	line '  ';&lt;BR /&gt;
	endcomp;&lt;BR /&gt;
	break after Cf_Su_Name / summarize OL ul skip; &lt;BR /&gt;
	compute Gb_Br_Name_1/char length=45;&lt;BR /&gt;
	if _break_='Cf_Su_Name' then &lt;BR /&gt;
			Gb_Br_Name_1='Total for Supplier ' || Cf_Su_Name ;&lt;BR /&gt;
	else Gb_Br_Name_1=Gb_Br_Name;&lt;BR /&gt;
	endcomp;&lt;BR /&gt;
	compute after  ;&lt;BR /&gt;
	Gb_Br_Name= 'Company Total ' ;&lt;BR /&gt;
	endcomp; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Can you get the solution.</description>
    <pubDate>Tue, 18 Sep 2007 09:54:05 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-09-18T09:54:05Z</dc:date>
    <item>
      <title>Problem in getting the proper through Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-in-getting-the-proper-through-Proc-Report/m-p/4741#M1515</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I am not getting the perfect output through proc report.&lt;BR /&gt;
&lt;BR /&gt;
Layout of my report&lt;BR /&gt;
&lt;BR /&gt;
branch name              internal Grn        External Grn  order no   Cost ... &lt;BR /&gt;
&lt;BR /&gt;
Supplier:  ACTIV-AIR AUTOMATION LTD  &lt;BR /&gt;
&lt;BR /&gt;
3010 XYZ Gloucester 123                     10000               1            1000&lt;BR /&gt;
                                                                                               --------&lt;BR /&gt;
Total for Supplier  ACTIV-AIR AUTOMATION LTD                         1000&lt;BR /&gt;
                                                                                               ---------&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End of report&lt;BR /&gt;
&lt;BR /&gt;
The problem in  this layout is that i am getting the same output but the line for total for supplier is taking the width of branch ,I wouls like to make it independent.&lt;BR /&gt;
&lt;BR /&gt;
I am sending you the code also.&lt;BR /&gt;
&lt;BR /&gt;
 options nobyline;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc report data=WORK.QUERY3051 nowd headskip split='*' spacing=1;&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;
			title1 'PTS       BM_SREP0370                                  Purchase Reserve Report BY Supplier                                      16/09/07';&lt;BR /&gt;
			title2  '                            ===================================                       ';&lt;BR /&gt;
			    &lt;BR /&gt;
	define Cf_Su_Name /group  noprint ;&lt;BR /&gt;
	define Gb_Br_Name  / group noprint ; &lt;BR /&gt;
	define Gb_Br_Name_1 /computed 'Branch Name';&lt;BR /&gt;
	define Pi_In_Grnno / order width=8;&lt;BR /&gt;
	define Pi_In_Grn / '  Supplier*   GRN No' order  width=10;&lt;BR /&gt;
	define Pi_In_Orderno / order width=10;&lt;BR /&gt;
	define Pi_In_Ordtype / 'Order*Type' 	flow width=5;&lt;BR /&gt;
	define Pi_In_Partno  / order width=8;&lt;BR /&gt;
	define Pi_In_Grndate / order width=10;&lt;BR /&gt;
	define Pi_In_Recqty / 'Quantity*Received' SUM format=8.;&lt;BR /&gt;
	define Pi_In_Recgoods / 'Net*Goods*Value' SUM format=comma8.2;&lt;BR /&gt;
	define Pi_In_Recprice / 'Net*Purchase*Cost' SUM	format=comma8.2;&lt;BR /&gt;
	rbreak after / summarize;  &lt;BR /&gt;
	compute before Cf_Su_Name;&lt;BR /&gt;
	line @2 'Supplier: ' Cf_Su_Name $25. ;&lt;BR /&gt;
	line '  ';&lt;BR /&gt;
	endcomp;&lt;BR /&gt;
	break after Cf_Su_Name / summarize OL ul skip; &lt;BR /&gt;
	compute Gb_Br_Name_1/char length=45;&lt;BR /&gt;
	if _break_='Cf_Su_Name' then &lt;BR /&gt;
			Gb_Br_Name_1='Total for Supplier ' || Cf_Su_Name ;&lt;BR /&gt;
	else Gb_Br_Name_1=Gb_Br_Name;&lt;BR /&gt;
	endcomp;&lt;BR /&gt;
	compute after  ;&lt;BR /&gt;
	Gb_Br_Name= 'Company Total ' ;&lt;BR /&gt;
	endcomp; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Can you get the solution.</description>
      <pubDate>Tue, 18 Sep 2007 09:54:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-in-getting-the-proper-through-Proc-Report/m-p/4741#M1515</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-18T09:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in getting the proper through Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-in-getting-the-proper-through-Proc-Report/m-p/4742#M1516</link>
      <description>Hi...I see one problem:&lt;BR /&gt;
[pre]&lt;BR /&gt;
define Gb_Br_Name / group noprint ; &lt;BR /&gt;
&lt;BR /&gt;
compute after ;&lt;BR /&gt;
  Gb_Br_Name= 'Company Total ' ;&lt;BR /&gt;
endcomp; &lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 Gb_Br_Name is a noprint variable, so you're probably not seeing "Company Total"  -- unless that was a typo.&lt;BR /&gt;
 &lt;BR /&gt;
I don't understand what you mean by:&lt;BR /&gt;
&lt;B&gt;"line for total for supplier is taking the width of branch"&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
because in your code, you have:&lt;BR /&gt;
[pre]&lt;BR /&gt;
define Gb_Br_Name_1 /computed 'Branch Name';&lt;BR /&gt;
    &lt;BR /&gt;
compute Gb_Br_Name_1/char length=45;&lt;BR /&gt;
  if _break_='Cf_Su_Name' then &lt;BR /&gt;
     Gb_Br_Name_1='Total for Supplier ' || Cf_Su_Name ;&lt;BR /&gt;
  else Gb_Br_Name_1=Gb_Br_Name;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 You have assigned Gb_Br_Name_1 a length of 45. At the break of Cf_Su_Name, you assign the value of Gb_Br_Name_1 to be the concatenated&lt;BR /&gt;
 string:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Total for Supplier xx whatever the Cf_Su_Name isxxxx &lt;BR /&gt;
  &lt;BR /&gt;
[/pre]&lt;BR /&gt;
So on that break row only, your code is changing the value in the &lt;B&gt; cell&lt;/B&gt; for Gb_Br_Name_1 -- this is not an independent "line" -- this is the line that automatically comes because of the BREAK statement for Cf_Su_Name and you are essentially "renaming" what would otherwise be in the column for Gb_Br_Name_1 -- on that row's report line.&lt;BR /&gt;
 &lt;BR /&gt;
Your only other option at this break is to write your own line with a LINE statement -- similar to what you do with your compute before block. I highly recommend the PROC REPORT documentation on the use of BREAK statements and LINE statements, especially the following help topics: &lt;B&gt;&lt;BR /&gt;
Concepts: REPORT Procedure&lt;BR /&gt;
How PROC REPORT Builds a Report&lt;BR /&gt;
Construction of Summary Lines &lt;/B&gt;&lt;BR /&gt;
  &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 19 Sep 2007 22:41:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-in-getting-the-proper-through-Proc-Report/m-p/4742#M1516</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-19T22:41:39Z</dc:date>
    </item>
  </channel>
</rss>

