<?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: LIST REPORT duplicates all my data in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256968#M18000</link>
    <description>&lt;P&gt;In&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;define&lt;/SPAN&gt; X_BCAE_POSITION&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;change "group" to "display".&lt;/P&gt;
&lt;P&gt;"group" causes a break after each entry and creates a summary line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;As far as I see, you don't need any group variable at all, so you should have only "display" or "analysis" in your DEFINE statements.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2016 08:44:33 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-03-16T08:44:33Z</dc:date>
    <item>
      <title>LIST REPORT duplicates all my data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256958#M17998</link>
      <description>&lt;P&gt;I have a clean data which has no duplicates record. I managed to get my expected result by using PROC PRINT. The reason why i want to use LIST REPOrT is that it is a simpler way to do reporting by&amp;nbsp;using PROC REPORT without hard code it which im not familiar with. Moreoever, in proc&amp;nbsp; print, i cant add a word "SUM" or "TOTAL" at the SUM row. Ppl here are suggesting me to use PROC REPORT but it is not as easy as what u might think considering that im not an expert in SAS EG that much.&lt;/P&gt;&lt;P&gt;&lt;IMG title="List report duplicate.jpg" border="0" alt="List report duplicate.jpg" src="https://communities.sas.com/t5/image/serverpage/image-id/2319iFB00090040A343AF/image-size/original?v=mpbl-1&amp;amp;px=-1" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as you all can see, by using LIST REPORT/"PROC REPORT", i can get a "Total" label&amp;nbsp;at the last row which cannot be done by PROC PRINT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case u want to see the code generated by the system:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TITLE1 "List Report";
FOOTNOTE1 "Generated by the SAS System (&amp;amp;_SASSERVERNAME, &amp;amp;SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";

proc report data=WORK.JOIN2BCAE nowd;
	column X_BCAE_NAME X_BCAE_POSITION X_BCAE_MORTGAGE, SUM=X_BCAE_MORTGAGE_SUM X_BCAE_CASHFLOW cv1 X_BCAE_CARLOAN cv2 X_BCAE_INCOME cv3 newsum cv4;
	define X_BCAE_NAME / group 'X_BCAE_NAME' format=$4000. missing order=formatted;
	compute X_BCAE_NAME;
		if _break_ eq ' ' then do;
			if X_BCAE_NAME ne ' ' then hold1=X_BCAE_NAME;
		end;
		if upcase(_break_)="X_BCAE_NAME" then do;
			call define("X_BCAE_NAME", 'style', 'style=[pretext="Subtotal "]');
		end;
		if _break_='_RBREAK_' then do;
			call define("X_BCAE_NAME", 'style', 'style=[pretext="Total"]');
		end;
	endcomp;
	define X_BCAE_POSITION / group 'X_BCAE_POSITION' format=$4000. missing order=formatted;
	compute X_BCAE_POSITION;
		if X_BCAE_POSITION ne ' ' then hold2=X_BCAE_POSITION;
		if X_BCAE_POSITION eq ' ' and _break_ eq ' ' then X_BCAE_POSITION=hold2;
	endcomp;
	define X_BCAE_MORTGAGE / analysis SUM 'X_BCAE_MORTGAGE' missing;
	define X_BCAE_CASHFLOW / group missing noprint;
	define cv1 / computed 'X_BCAE_CASHFLOW' missing;
	compute cv1 / char;
		if _break_ eq ' ' then do;
		if X_BCAE_CASHFLOW ne . then hold3=X_BCAE_CASHFLOW;
			cv1=put(hold3,8.);
		end;
		if _break_ ne ' ' then cv1=' ';
		if upcase(_break_)="X_BCAE_NAME" then cv1=put(hold3,8.);
	endcomp;
	define X_BCAE_CARLOAN / group missing noprint;
	define cv2 / computed 'X_BCAE_CARLOAN' missing;
	compute cv2 / char;
		if _break_ eq ' ' then do;
		if X_BCAE_CARLOAN ne . then hold4=X_BCAE_CARLOAN;
			cv2=put(hold4,8.);
		end;
		if _break_ ne ' ' then cv2=' ';
		if upcase(_break_)="X_BCAE_NAME" then cv2=put(hold4,8.);
	endcomp;
	define X_BCAE_INCOME / group missing noprint;
	define cv3 / computed 'X_BCAE_INCOME' missing;
	compute cv3 / char;
		if _break_ eq ' ' then do;
		if X_BCAE_INCOME ne . then hold5=X_BCAE_INCOME;
			cv3=put(hold5,8.);
		end;
		if _break_ ne ' ' then cv3=' ';
		if upcase(_break_)="X_BCAE_NAME" then cv3=put(hold5,8.);
	endcomp;
	define newsum / group missing noprint;
	define cv4 / computed 'newsum' missing;
	compute cv4 / char;
		if _break_ eq ' ' then do;
		if newsum ne . then hold6=newsum;
			cv4=put(hold6,8.);
		end;
		if _break_ ne ' ' then cv4=' ';
		if upcase(_break_)="X_BCAE_NAME" then cv4=put(hold6,8.);
	endcomp;
	break after X_BCAE_POSITION / summarize;
	rbreak after / summarize;
	run;
quit;
TITLE; FOOTNOTE;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your advice is highly appreciated&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 06:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256958#M17998</guid>
      <dc:creator>imdickson</dc:creator>
      <dc:date>2016-03-16T06:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: LIST REPORT duplicates all my data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256968#M18000</link>
      <description>&lt;P&gt;In&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;define&lt;/SPAN&gt; X_BCAE_POSITION&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;change "group" to "display".&lt;/P&gt;
&lt;P&gt;"group" causes a break after each entry and creates a summary line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;As far as I see, you don't need any group variable at all, so you should have only "display" or "analysis" in your DEFINE statements.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 08:44:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256968#M18000</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-03-16T08:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: LIST REPORT duplicates all my data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256976#M18001</link>
      <description>&lt;P&gt;Hey there, i tried changing to display but it is still giving me the same result.&lt;/P&gt;&lt;P&gt;2nd update: i tried to use the most basic PROC REPORT hardcode way and i found out if i use BREAK AFTER, i will get the same duplicate records but if i use RBREAK, no more duplications....can you tell me their differences and my question is here, how do i add a label "SUM" or "TOTAL" at the last row under "POSITION" variable?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 09:23:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256976#M18001</guid>
      <dc:creator>imdickson</dc:creator>
      <dc:date>2016-03-16T09:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: LIST REPORT duplicates all my data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256981#M18002</link>
      <description>&lt;P&gt;I added this code before RBREAK:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;compute


 X_BCAE_POSITION; 
if


 _break_ ne ' ' then call define('age','style','style=[pretext="total"]'); 
endcomp


; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Its not working&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 09:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256981#M18002</guid>
      <dc:creator>imdickson</dc:creator>
      <dc:date>2016-03-16T09:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: LIST REPORT duplicates all my data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256988#M18003</link>
      <description>&lt;P&gt;Could you please post some test data in a data step with CARDS?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 10:52:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/LIST-REPORT-duplicates-all-my-data/m-p/256988#M18003</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-03-16T10:52:28Z</dc:date>
    </item>
  </channel>
</rss>

