<?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 Different colors for headers in proc report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Different-colors-for-headers-in-proc-report/m-p/489504#M127836</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;I want to change the color of the header background and foreground for one value of the variables under the across variable (for Fever,cases and rate as one color and same goes with Cold &amp;amp; Flu ). I want to change the color of header cells only not their values and want separate colors for fever, cold and flu.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;I want different colors for (fever,cases &amp;amp; rates )&amp;amp;(cold,cases &amp;amp; rates)&amp;nbsp;(flu,cases &amp;amp; rates ) cells and&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Version 9.3 or 9.4. A sample SAS Proc report code is below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;length name $ 10 disease $ 10.;&lt;BR /&gt;infile datalines dsd;&lt;BR /&gt;input name $ disease cases rate;&lt;BR /&gt;datalines;&lt;BR /&gt;State,Fever,4847,25.16&lt;BR /&gt;State,Cold,25632,131.5&lt;BR /&gt;State,Flu,103825,535.82&lt;BR /&gt;Lincoln,Fever,3920,44.17&lt;BR /&gt;Lincoln,Cold,16913,190.18&lt;BR /&gt;Lincoln,Flu,62965,735.39&lt;BR /&gt;Washington,Fever,827,56.56&lt;BR /&gt;Washington,Cold,3609,234.26&lt;BR /&gt;Washington,Flu,16610,1078.8&lt;BR /&gt;Kings,Fever,1026,37.45&lt;BR /&gt;Kings,Cold,4984,181.85&lt;BR /&gt;Kings,Flu,18388,694.33&lt;BR /&gt;Sussex,Fever,1411,78.38&lt;BR /&gt;Sussex,Cold,5515,300.46&lt;BR /&gt;Sussex,Flu,13881,813.11&lt;BR /&gt;Queens,Fever,616,26.03&lt;BR /&gt;Queens,Cold,2496,107.75&lt;BR /&gt;Queens,Flu,12518,558.09&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data=test nowd headline headskip&lt;/P&gt;&lt;P&gt;style(column)={background=gray foreground=black}&lt;BR /&gt;style(report)=[rules=rows bordercolor=white];&lt;BR /&gt;columns (name disease,(cases rate));&lt;BR /&gt;define name/group order=data 'County' style(column)={background=lightgray} style(header)=[bordertopcolor=gainsboro background=gainsboro foreground=black];&lt;BR /&gt;define disease/across '' order=data style(header)={background=purple foreground=pink}; ;&lt;BR /&gt;define cases/'Cases' format=comma9. ;&lt;BR /&gt;define rate/'Rate' format=comma12.1 ;&lt;BR /&gt;compute cases;&lt;BR /&gt;call define('_c4_','style','style={background=lighttgray}');&lt;BR /&gt;call define('_c5_','style','style={background=cyan}');&lt;BR /&gt;endcomp;&lt;BR /&gt;compute disease;&lt;BR /&gt;if disease='Fever' then do;&lt;BR /&gt;call define(_col_,'style','style=[background=brown ');&lt;BR /&gt;end;&lt;BR /&gt;else if disease='Flu' then do;&lt;BR /&gt;call define(_col_,'style','style=[background=green ');&lt;BR /&gt;end;&lt;BR /&gt;else if disease='Cold' then do;&lt;BR /&gt;call define(_col_,'style','style=[background=orange ');&lt;BR /&gt;end;&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Aug 2018 06:50:39 GMT</pubDate>
    <dc:creator>srinivaschary</dc:creator>
    <dc:date>2018-08-24T06:50:39Z</dc:date>
    <item>
      <title>Different colors for headers in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-colors-for-headers-in-proc-report/m-p/489504#M127836</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;I want to change the color of the header background and foreground for one value of the variables under the across variable (for Fever,cases and rate as one color and same goes with Cold &amp;amp; Flu ). I want to change the color of header cells only not their values and want separate colors for fever, cold and flu.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;I want different colors for (fever,cases &amp;amp; rates )&amp;amp;(cold,cases &amp;amp; rates)&amp;nbsp;(flu,cases &amp;amp; rates ) cells and&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Version 9.3 or 9.4. A sample SAS Proc report code is below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;length name $ 10 disease $ 10.;&lt;BR /&gt;infile datalines dsd;&lt;BR /&gt;input name $ disease cases rate;&lt;BR /&gt;datalines;&lt;BR /&gt;State,Fever,4847,25.16&lt;BR /&gt;State,Cold,25632,131.5&lt;BR /&gt;State,Flu,103825,535.82&lt;BR /&gt;Lincoln,Fever,3920,44.17&lt;BR /&gt;Lincoln,Cold,16913,190.18&lt;BR /&gt;Lincoln,Flu,62965,735.39&lt;BR /&gt;Washington,Fever,827,56.56&lt;BR /&gt;Washington,Cold,3609,234.26&lt;BR /&gt;Washington,Flu,16610,1078.8&lt;BR /&gt;Kings,Fever,1026,37.45&lt;BR /&gt;Kings,Cold,4984,181.85&lt;BR /&gt;Kings,Flu,18388,694.33&lt;BR /&gt;Sussex,Fever,1411,78.38&lt;BR /&gt;Sussex,Cold,5515,300.46&lt;BR /&gt;Sussex,Flu,13881,813.11&lt;BR /&gt;Queens,Fever,616,26.03&lt;BR /&gt;Queens,Cold,2496,107.75&lt;BR /&gt;Queens,Flu,12518,558.09&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data=test nowd headline headskip&lt;/P&gt;&lt;P&gt;style(column)={background=gray foreground=black}&lt;BR /&gt;style(report)=[rules=rows bordercolor=white];&lt;BR /&gt;columns (name disease,(cases rate));&lt;BR /&gt;define name/group order=data 'County' style(column)={background=lightgray} style(header)=[bordertopcolor=gainsboro background=gainsboro foreground=black];&lt;BR /&gt;define disease/across '' order=data style(header)={background=purple foreground=pink}; ;&lt;BR /&gt;define cases/'Cases' format=comma9. ;&lt;BR /&gt;define rate/'Rate' format=comma12.1 ;&lt;BR /&gt;compute cases;&lt;BR /&gt;call define('_c4_','style','style={background=lighttgray}');&lt;BR /&gt;call define('_c5_','style','style={background=cyan}');&lt;BR /&gt;endcomp;&lt;BR /&gt;compute disease;&lt;BR /&gt;if disease='Fever' then do;&lt;BR /&gt;call define(_col_,'style','style=[background=brown ');&lt;BR /&gt;end;&lt;BR /&gt;else if disease='Flu' then do;&lt;BR /&gt;call define(_col_,'style','style=[background=green ');&lt;BR /&gt;end;&lt;BR /&gt;else if disease='Cold' then do;&lt;BR /&gt;call define(_col_,'style','style=[background=orange ');&lt;BR /&gt;end;&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 06:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-colors-for-headers-in-proc-report/m-p/489504#M127836</guid>
      <dc:creator>srinivaschary</dc:creator>
      <dc:date>2018-08-24T06:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Different colors for headers in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-colors-for-headers-in-proc-report/m-p/489802#M127968</link>
      <description>&lt;P&gt;Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Aug 2018 03:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-colors-for-headers-in-proc-report/m-p/489802#M127968</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-08-25T03:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Different colors for headers in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-colors-for-headers-in-proc-report/m-p/489821#M127977</link>
      <description>Hi:&lt;BR /&gt;  The challenge with your CALL DEFINE is that it does not touch the header cells which is what you say you want to touch. I question whether you want brown as a color, since the black font on a brown background will be nearly illegible.&lt;BR /&gt;&lt;BR /&gt;  Are the colors in the XLSX what you want or what you show in your code. It looks like the fonts are a different color in the XLSX example.&lt;BR /&gt;&lt;BR /&gt;What is your desired destination for the PROC REPORT output?&lt;BR /&gt;&lt;BR /&gt;  The challenge with your ACROSS items is that there are a couple of different ways you might proceed.  I've got one example here: &lt;A href="http://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf&lt;/A&gt; on pages 12/13. I know that some folks have used a format example for the ACROSS, but that won't impact the CASE and RATE under each unique ACROSS value, which is what you indicate that you want.&lt;BR /&gt;&lt;BR /&gt;  BTW, headline and headskip are ignored by ODS destinations because they are LISTING-only options and irrelevant for ODS destinations like ODS RTF, ODS PDF, ODS HTML, or ODS EXCEL.&lt;BR /&gt;&lt;BR /&gt;  To make it easy, I might switch to TABULATE, because a header cell can inherit attributes from the parent cell above or else if you want to stick with REPORT, make 2 passes thru the data.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Sat, 25 Aug 2018 14:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-colors-for-headers-in-proc-report/m-p/489821#M127977</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-08-25T14:19:01Z</dc:date>
    </item>
  </channel>
</rss>

