<?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 - header values are being printed twice in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-header-values-are-being-printed-twice/m-p/718010#M80156</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am experiencing a weird situation where PROC REPORT is listing the header value twice, i.e. two variable names stacked on top of each other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Background: I am using a driver/control file that stores information (raw data variable names) for all of our clients, and all of the reporting outputs reference this driver/control file.&amp;nbsp; When two columns in the PROC REPORT output have the same value, then it lists the variable name twice on top of each other (see attached screenshot).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PROC REPORT headers.JPG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54517i0DEF5D807FEE7C04/image-size/large?v=v2&amp;amp;px=999" role="button" title="PROC REPORT headers.JPG" alt="PROC REPORT headers.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my PROC REPORT code for reference:&lt;/P&gt;
&lt;PRE&gt;PROC REPORT DATA=&amp;amp;client_number..&amp;amp;client_number._&amp;amp;medte._analysis STYLE(header)=[fontfamily="Albany AMT"] STYLE(column)=[fontfamily="Albany AMT"] ;
SYSECHO "%sysfunc(PROPCASE(%sysfunc(TRANSLATE(&amp;amp;client_name., ' ', '_')))) - Printing Average Trending Statistics" ;
	%if %sysevalf(%superq(trending_filter)=, boolean) NE 1 %then %do ; /* test condition to check if where= parameter is blank (1) or has a value (0) */
		WHERE (&amp;amp;trending_filter.) ;
		%if %upcase(&amp;amp;client_number.) NE GATE %then %do ;
			COLUMNS &amp;amp;_gross_balance. &amp;amp;_net_balance. &amp;amp;_amount_financed. &amp;amp;_apr. &amp;amp;_monthly_payment_amount. &amp;amp;_monthly_term. REMAINING_TERM_c &amp;amp;_gross_balance.=total_gross ;&lt;BR /&gt;
			DEFINE &amp;amp;_gross_balance. / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
			DEFINE &amp;amp;_net_balance. / MEAN "&amp;amp;_net_balance." STYLE(column)=[cellwidth=1.4in just=center] ;	
		%end ;
		%else %if %upcase(&amp;amp;client_number.) EQ GATE %then %do ;
			COLUMNS &amp;amp;_gross_balance. payoff &amp;amp;_amount_financed. &amp;amp;_apr. &amp;amp;_monthly_payment_amount. &amp;amp;_monthly_term. REMAINING_TERM_c &amp;amp;_gross_balance.=total_gross ;&lt;BR /&gt;
			DEFINE &amp;amp;_gross_balance. / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
			DEFINE payoff / MEAN "payoff" STYLE(column)=[cellwidth=1.4in just=center] ;
		%end ;
		DEFINE &amp;amp;_amount_financed. / MEAN "&amp;amp;_amount_financed." STYLE(column)=[cellwidth=1.4in just=center] ;
		DEFINE &amp;amp;_apr. / MEAN "&amp;amp;_apr." STYLE(column)=[cellwidth=1.2in just=center] ;
		DEFINE &amp;amp;_monthly_payment_amount. / MEAN "&amp;amp;_monthly_payment_amount." STYLE(column)=[cellwidth=1.8in just=center] ;
		DEFINE &amp;amp;_monthly_term. / MEAN "&amp;amp;_monthly_term." STYLE(column)=[cellwidth=1.2in just=center] FORMAT=3. ;
		DEFINE REMAINING_TERM_c / MEAN STYLE(column)=[cellwidth=1.4in just=center] FORMAT=3. ;
		DEFINE total_gross / SUM "Total &amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.6in just=center] FORMAT=dollar18.2 ;

		COMPUTE AFTER / STYLE=[fontsize=3 fontfamily="Calibri" font_style=italic just=c] ;
			LINE " " ;
			LINE "Avg Trending Filter Used: &amp;amp;trending_filter." ;
			LINE " " ;
		ENDCOMP 
	%end ;
	%else %do ;
		COLUMNS &amp;amp;_gross_balance. &amp;amp;_net_balance. &amp;amp;_amount_financed. &amp;amp;_apr. &amp;amp;_monthly_payment_amount. &amp;amp;_monthly_term. REMAINING_TERM_c &amp;amp;_gross_balance.=total_gross ;&lt;BR /&gt;
		DEFINE &amp;amp;_gross_balance. / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
		DEFINE &amp;amp;_net_balance. / MEAN "&amp;amp;_net_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
		DEFINE &amp;amp;_amount_financed. / MEAN "&amp;amp;_amount_financed." STYLE(column)=[cellwidth=1.4in just=center] ;
		DEFINE &amp;amp;_apr. / MEAN "&amp;amp;_apr." STYLE(column)=[cellwidth=1.2in just=center] ;
		DEFINE &amp;amp;_monthly_payment_amount. / MEAN "&amp;amp;_monthly_payment_amount." STYLE(column)=[cellwidth=1.8in just=center] ;
		DEFINE &amp;amp;_monthly_term. / MEAN "&amp;amp;_monthly_term." STYLE(column)=[cellwidth=1.2in just=center] FORMAT=3. ;
		DEFINE REMAINING_TERM_c / MEAN STYLE(column)=[cellwidth=1.4in just=center] FORMAT=3. ;
		DEFINE total_gross / SUM "Total &amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.6in just=center] FORMAT=dollar18.2 ;
	
		COMPUTE AFTER / STYLE=[fontsize=3 fontfamily="Calibri" font_style=italic just=c] ;
			LINE " " ;
			LINE "Avg Trending Filter Used: None" ;
			LINE " " ;
		ENDCOMP ;
	%end ;
	RUN ;&lt;/PRE&gt;
&lt;P&gt;So the issue is that if the values for &amp;amp;_gross_balance. and &amp;amp;_net_balance. are the same, then those variable names are being double printed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help is appreciated, though this is more annoying than anything else.&amp;nbsp; Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 20:44:15 GMT</pubDate>
    <dc:creator>GBL__</dc:creator>
    <dc:date>2021-02-09T20:44:15Z</dc:date>
    <item>
      <title>PROC REPORT - header values are being printed twice</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-header-values-are-being-printed-twice/m-p/718010#M80156</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am experiencing a weird situation where PROC REPORT is listing the header value twice, i.e. two variable names stacked on top of each other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Background: I am using a driver/control file that stores information (raw data variable names) for all of our clients, and all of the reporting outputs reference this driver/control file.&amp;nbsp; When two columns in the PROC REPORT output have the same value, then it lists the variable name twice on top of each other (see attached screenshot).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PROC REPORT headers.JPG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54517i0DEF5D807FEE7C04/image-size/large?v=v2&amp;amp;px=999" role="button" title="PROC REPORT headers.JPG" alt="PROC REPORT headers.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my PROC REPORT code for reference:&lt;/P&gt;
&lt;PRE&gt;PROC REPORT DATA=&amp;amp;client_number..&amp;amp;client_number._&amp;amp;medte._analysis STYLE(header)=[fontfamily="Albany AMT"] STYLE(column)=[fontfamily="Albany AMT"] ;
SYSECHO "%sysfunc(PROPCASE(%sysfunc(TRANSLATE(&amp;amp;client_name., ' ', '_')))) - Printing Average Trending Statistics" ;
	%if %sysevalf(%superq(trending_filter)=, boolean) NE 1 %then %do ; /* test condition to check if where= parameter is blank (1) or has a value (0) */
		WHERE (&amp;amp;trending_filter.) ;
		%if %upcase(&amp;amp;client_number.) NE GATE %then %do ;
			COLUMNS &amp;amp;_gross_balance. &amp;amp;_net_balance. &amp;amp;_amount_financed. &amp;amp;_apr. &amp;amp;_monthly_payment_amount. &amp;amp;_monthly_term. REMAINING_TERM_c &amp;amp;_gross_balance.=total_gross ;&lt;BR /&gt;
			DEFINE &amp;amp;_gross_balance. / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
			DEFINE &amp;amp;_net_balance. / MEAN "&amp;amp;_net_balance." STYLE(column)=[cellwidth=1.4in just=center] ;	
		%end ;
		%else %if %upcase(&amp;amp;client_number.) EQ GATE %then %do ;
			COLUMNS &amp;amp;_gross_balance. payoff &amp;amp;_amount_financed. &amp;amp;_apr. &amp;amp;_monthly_payment_amount. &amp;amp;_monthly_term. REMAINING_TERM_c &amp;amp;_gross_balance.=total_gross ;&lt;BR /&gt;
			DEFINE &amp;amp;_gross_balance. / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
			DEFINE payoff / MEAN "payoff" STYLE(column)=[cellwidth=1.4in just=center] ;
		%end ;
		DEFINE &amp;amp;_amount_financed. / MEAN "&amp;amp;_amount_financed." STYLE(column)=[cellwidth=1.4in just=center] ;
		DEFINE &amp;amp;_apr. / MEAN "&amp;amp;_apr." STYLE(column)=[cellwidth=1.2in just=center] ;
		DEFINE &amp;amp;_monthly_payment_amount. / MEAN "&amp;amp;_monthly_payment_amount." STYLE(column)=[cellwidth=1.8in just=center] ;
		DEFINE &amp;amp;_monthly_term. / MEAN "&amp;amp;_monthly_term." STYLE(column)=[cellwidth=1.2in just=center] FORMAT=3. ;
		DEFINE REMAINING_TERM_c / MEAN STYLE(column)=[cellwidth=1.4in just=center] FORMAT=3. ;
		DEFINE total_gross / SUM "Total &amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.6in just=center] FORMAT=dollar18.2 ;

		COMPUTE AFTER / STYLE=[fontsize=3 fontfamily="Calibri" font_style=italic just=c] ;
			LINE " " ;
			LINE "Avg Trending Filter Used: &amp;amp;trending_filter." ;
			LINE " " ;
		ENDCOMP 
	%end ;
	%else %do ;
		COLUMNS &amp;amp;_gross_balance. &amp;amp;_net_balance. &amp;amp;_amount_financed. &amp;amp;_apr. &amp;amp;_monthly_payment_amount. &amp;amp;_monthly_term. REMAINING_TERM_c &amp;amp;_gross_balance.=total_gross ;&lt;BR /&gt;
		DEFINE &amp;amp;_gross_balance. / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
		DEFINE &amp;amp;_net_balance. / MEAN "&amp;amp;_net_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
		DEFINE &amp;amp;_amount_financed. / MEAN "&amp;amp;_amount_financed." STYLE(column)=[cellwidth=1.4in just=center] ;
		DEFINE &amp;amp;_apr. / MEAN "&amp;amp;_apr." STYLE(column)=[cellwidth=1.2in just=center] ;
		DEFINE &amp;amp;_monthly_payment_amount. / MEAN "&amp;amp;_monthly_payment_amount." STYLE(column)=[cellwidth=1.8in just=center] ;
		DEFINE &amp;amp;_monthly_term. / MEAN "&amp;amp;_monthly_term." STYLE(column)=[cellwidth=1.2in just=center] FORMAT=3. ;
		DEFINE REMAINING_TERM_c / MEAN STYLE(column)=[cellwidth=1.4in just=center] FORMAT=3. ;
		DEFINE total_gross / SUM "Total &amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.6in just=center] FORMAT=dollar18.2 ;
	
		COMPUTE AFTER / STYLE=[fontsize=3 fontfamily="Calibri" font_style=italic just=c] ;
			LINE " " ;
			LINE "Avg Trending Filter Used: None" ;
			LINE " " ;
		ENDCOMP ;
	%end ;
	RUN ;&lt;/PRE&gt;
&lt;P&gt;So the issue is that if the values for &amp;amp;_gross_balance. and &amp;amp;_net_balance. are the same, then those variable names are being double printed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help is appreciated, though this is more annoying than anything else.&amp;nbsp; Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 20:44:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-header-values-are-being-printed-twice/m-p/718010#M80156</guid>
      <dc:creator>GBL__</dc:creator>
      <dc:date>2021-02-09T20:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - header values are being printed twice</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-header-values-are-being-printed-twice/m-p/718017#M80157</link>
      <description>&lt;P&gt;Sounds like somewhere you need a requirement for &amp;amp;_gross_balance. and &amp;amp;_net_balance to be different.&lt;/P&gt;
&lt;P&gt;That is just another %if &amp;amp;_gross_balance. ne &amp;amp;_net_balance %then %do;&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;%else %do; /* you don't include both*/&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;blocks where you build Columns statements and Define blocks .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 20:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-header-values-are-being-printed-twice/m-p/718017#M80157</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-02-09T20:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - header values are being printed twice</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-header-values-are-being-printed-twice/m-p/718023#M80160</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was hoping to not have to add additional logic to get around this, but it is what it is.&amp;nbsp; This is what I did and it looks to be working as expected:&lt;/P&gt;
&lt;PRE&gt;PROC REPORT DATA=&amp;amp;client_number..&amp;amp;client_number._&amp;amp;medte._analysis STYLE(header)=[fontfamily="Albany AMT"] STYLE(column)=[fontfamily="Albany AMT"] ;
	SYSECHO "%sysfunc(PROPCASE(%sysfunc(TRANSLATE(&amp;amp;client_name., ' ', '_')))) - Printing Average Trending Statistics" ;
	%if %sysevalf(%superq(trending_filter)=, boolean) NE 1 %then %do ; /* test condition to check if where= parameter is blank (1) or has a value (0) */
		WHERE (&amp;amp;trending_filter.) ;
		%if %upcase(&amp;amp;client_number.) NE GATE %then %do ;
			&lt;STRONG&gt;%if %upcase(&amp;amp;_gross_balance.) NE %upcase(&amp;amp;_net_balance.) %then %do ;
				COLUMNS &amp;amp;_gross_balance. &amp;amp;_net_balance. &amp;amp;_amount_financed. &amp;amp;_apr. &amp;amp;_monthly_payment_amount. &amp;amp;_monthly_term. REMAINING_TERM_c &amp;amp;_gross_balance.=total_gross ;

				DEFINE &amp;amp;_gross_balance. / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
				DEFINE &amp;amp;_net_balance. / MEAN "&amp;amp;_net_balance." STYLE(column)=[cellwidth=1.4in just=center] ;	
			%end ;
			%else %do ;
				COLUMNS &amp;amp;_gross_balance. &amp;amp;_gross_balance.=NET_BAL &amp;amp;_amount_financed. &amp;amp;_apr. &amp;amp;_monthly_payment_amount. &amp;amp;_monthly_term. REMAINING_TERM_c &amp;amp;_gross_balance.=total_gross ;

				DEFINE &amp;amp;_gross_balance. / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
				DEFINE NET_BAL / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;	
			%end ;&lt;/STRONG&gt;
		%end ;
		%else %if %upcase(&amp;amp;client_number.) EQ GATE %then %do ;
			COLUMNS &amp;amp;_gross_balance. payoff &amp;amp;_amount_financed. &amp;amp;_apr. &amp;amp;_monthly_payment_amount. &amp;amp;_monthly_term. REMAINING_TERM_c &amp;amp;_gross_balance.=total_gross ;
	
			DEFINE &amp;amp;_gross_balance. / MEAN "&amp;amp;_gross_balance." STYLE(column)=[cellwidth=1.4in just=center] ;
			DEFINE payoff / MEAN "payoff" STYLE(column)=[cellwidth=1.4in just=center] ;
		%end ;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Feb 2021 21:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-header-values-are-being-printed-twice/m-p/718023#M80160</guid>
      <dc:creator>GBL__</dc:creator>
      <dc:date>2021-02-09T21:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - header values are being printed twice</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-header-values-are-being-printed-twice/m-p/718025#M80161</link>
      <description>&lt;P&gt;Glad you could work that out with just a hint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 21:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-header-values-are-being-printed-twice/m-p/718025#M80161</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-02-09T21:10:49Z</dc:date>
    </item>
  </channel>
</rss>

