<?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: proc report, making  spanning header a different color. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/m-p/697237#M213067</link>
    <description>&lt;P&gt;yes, just like 2b.&amp;nbsp; though perhaps with everything but the percent header a uniform color.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 20:41:51 GMT</pubDate>
    <dc:creator>mcook</dc:creator>
    <dc:date>2020-11-06T20:41:51Z</dc:date>
    <item>
      <title>proc report, making  spanning header a different color.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/m-p/697169#M213040</link>
      <description>&lt;P&gt;The following code produces these variables and spanning header.&amp;nbsp;&amp;nbsp;&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="header_color.PNG" style="width: 550px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51459i0BBEEC86F48B9B88/image-size/large?v=v2&amp;amp;px=999" role="button" title="header_color.PNG" alt="header_color.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf path = "&amp;amp;ODS_Path."
	file = "&amp;amp;CompSub._Percents" ;

proc report data=percenttable_&amp;amp;CompSub. style(header) = [background = lightblue];;
title "&amp;amp;Sub.";
	column year ('Percent' (Minimal Basic Passing Proficient Advanced PassingPlus ProficientPlus));
	define year / center;
	define minimal /center;
	define basic / center;
	define passing / center;
	define proficient / center;
	define advanced / center;
	define passingplus / 'Passing +' center style(column)=[cellwidth=125] ;
	define proficientplus / 'Proficient +' center style(column)=[cellwidth=130] ;

run;

ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is it possible to make ONLY the spanning header (Percent) light blue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/m-p/697169#M213040</guid>
      <dc:creator>mcook</dc:creator>
      <dc:date>2020-11-06T15:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: proc report, making  spanning header a different color.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/m-p/697211#M213055</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; In this example using SASHELP.SHOES, how would you envision the cell above REGION to be treated? As shown in #1 or #2a or 2b?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1604683417658.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51464iA06CBF386CDCD05D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1604683417658.png" alt="Cynthia_sas_1-1604683417658.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This paper has some examples of applying colors to headers: &lt;A href="https://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf&lt;/A&gt; Look at the examples on pages 12 and 13.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 17:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/m-p/697211#M213055</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-11-06T17:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: proc report, making  spanning header a different color.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/m-p/697237#M213067</link>
      <description>&lt;P&gt;yes, just like 2b.&amp;nbsp; though perhaps with everything but the percent header a uniform color.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 20:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/m-p/697237#M213067</guid>
      <dc:creator>mcook</dc:creator>
      <dc:date>2020-11-06T20:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: proc report, making  spanning header a different color.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/m-p/697341#M213090</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;Like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1604699610484.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51472iDCF96BFFB8B29A9F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1604699610484.png" alt="Cynthia_sas_0-1604699610484.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With all the different colors the cell above Region didn't bother me, but with the lower headers all the same color, I think I like #1 better now. Note that for #2b, with helper variables, I had to make the helper variables in a separate DATA step program. Also, to get the cell above REGION a different color, some text had to be inserted into that cell so the color could be changed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's the code I used for the above.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data shoes;
  set sashelp.shoes;
  regback='.';
  otherback = 'Spanning Header';
  numvar = 1;
run;

ods rtf file = "c:\temp\span_color.rtf";
 
proc report data=sashelp.shoes(obs=3)
    style(header) = [background = lightblue]; 
    title "alt 1) Only Spanning Header light blue AND cell above Region";
	column region ('Spanning Header'  subsidiary product sales inventory returns);
	define region / style(header)={just=c background=lightyellow};
	define subsidiary /style(header)={just=c background=lightyellow};
	define product /style(header)={just=c background=lightyellow};
	define sales / style(header)={just=c background=lightyellow};
	define inventory / style(header)={just=c background=lightyellow};
	define returns / style(header)={just=c background=lightyellow};
 run;

  
 proc format;
   value $hdrf 'Region' = 'lightyellow'
               'Subsidiary' = 'lightyellow'
			   'Product' = 'lightyellow'
			   'Total Sales' = 'lightyellow'
			   'Total Inventory' = 'lightyellow'
			   'Total Returns' = 'lightyellow'
			   'Spanning Header' = 'lightblue'
			   '~' = 'lightyellow'
			   other = 'white';
     value $h2fm '~' = 'lightyellow';
 run;

proc report data=sashelp.shoes(obs=3)
    style(header)={just=c background=$hdrf. color=$h2fm.};
    title "alt 2a) Use format for changing header backgrounds";
    column ('~' region)  ('Spanning Header' subsidiary product sales inventory returns);
	define region / 'Region' ;
	define subsidiary / 'Subsidiary';
	define product / 'Product';
	define sales /  'Total Sales';
	define inventory / 'Total Inventory';
	define returns /  'Total Returns';
 run;

proc report data=shoes(obs=3);
    title "alt 2b) Use 'helper' variables for changing header backgrounds";
    column numvar regback,region  otherback,(subsidiary product sales inventory returns);
    define numvar / group ' ' noprint;
	define regback / across ' ' style(header)={just=c background=lightyellow color=lightyellow};
	define region / style(header)={just=c background=lightyellow};
	define otherback / across ' ' style(header)={just=c background=lightblue};
	define subsidiary /style(header)={just=c background=lightyellow};
	define product /style(header)={just=c background=lightyellow};
	define sales / style(header)={just=c background=lightyellow};
	define inventory / style(header)={just=c background=lightyellow};
	define returns / style(header)={just=c background=lightyellow};
 run;

ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Nov 2020 14:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/m-p/697341#M213090</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-11-07T14:41:15Z</dc:date>
    </item>
  </channel>
</rss>

