<?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 use of style to apply color to spanned columns in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945507#M83661</link>
    <description>&lt;P&gt;Hi, I am working on the report and I need help with applying the same colors to the headers of the spanning columns. For example I want to add “azure” color to the header cell 'PUBLISHABLE w. FLAGS'.&amp;nbsp; Also, how I can add a color to the background for the 'Cutoffs Percentages' cell? &amp;nbsp;Below is my SAS code and the output I got so far. I am looking for a suggestions how I can modify my code to color other header cells in the table below that are not colored now. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;report&lt;/STRONG&gt; data=TestData (keep=cycle entity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case Frequency&amp;nbsp; GeoMean&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Deficient_Frequency Deficient_Percent Marginal_Frequency&amp;nbsp;&amp;nbsp;&amp;nbsp; Marginal_Percent);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;column ('PUBLISHABLE w. FLAGS' cycle entity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case) ('Geometric Results'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Frequency&amp;nbsp; GeoMean&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;('Cutoffs Percentages' ( 'Deficient (&amp;lt;148 pmol per L)' Deficient_Frequency&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Deficient_Percent)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;('Marginal (148-220 pmol per L)' Marginal_Frequency&amp;nbsp;&amp;nbsp;&amp;nbsp; Marginal_Percent )) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define cycle/display style(header)={background=azure};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define entity/display style(header)={background=azure};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define case/display style(header)={background=azure};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE cycle;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=azure]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE entity;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=azure]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE case;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=azure]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;*geomeans;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Frequency/display 'N' style(header)={background=PAY};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define GeoMean/display style(header)={background=PAY};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define LowerCLGM/display style(header)={background=PAY};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Frequency;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=PAY]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE GeoMean;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=PAY]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;*Deficient Percent;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Deficient_Frequency/display style(header)={background=GWH};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Deficient_Percent/display style(header)={background=GWH};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Deficient_Frequency;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=GWH]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Deficient_Percent;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=GWH]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;*marginal Percent;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Marginal_Frequency/display style(header)={background=PWH};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Marginal_Percent/display style(header)={background=PWH};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Marginal_Frequency;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=PWH]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Marginal_Percent;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=PWH]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&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="LLOUKINE_0-1727469967818.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100721i1CDDF512327B7046/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LLOUKINE_0-1727469967818.png" alt="LLOUKINE_0-1727469967818.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2024 20:48:28 GMT</pubDate>
    <dc:creator>LLOUKINE</dc:creator>
    <dc:date>2024-09-27T20:48:28Z</dc:date>
    <item>
      <title>use of style to apply color to spanned columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945507#M83661</link>
      <description>&lt;P&gt;Hi, I am working on the report and I need help with applying the same colors to the headers of the spanning columns. For example I want to add “azure” color to the header cell 'PUBLISHABLE w. FLAGS'.&amp;nbsp; Also, how I can add a color to the background for the 'Cutoffs Percentages' cell? &amp;nbsp;Below is my SAS code and the output I got so far. I am looking for a suggestions how I can modify my code to color other header cells in the table below that are not colored now. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;report&lt;/STRONG&gt; data=TestData (keep=cycle entity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case Frequency&amp;nbsp; GeoMean&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Deficient_Frequency Deficient_Percent Marginal_Frequency&amp;nbsp;&amp;nbsp;&amp;nbsp; Marginal_Percent);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;column ('PUBLISHABLE w. FLAGS' cycle entity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case) ('Geometric Results'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Frequency&amp;nbsp; GeoMean&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;('Cutoffs Percentages' ( 'Deficient (&amp;lt;148 pmol per L)' Deficient_Frequency&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Deficient_Percent)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;('Marginal (148-220 pmol per L)' Marginal_Frequency&amp;nbsp;&amp;nbsp;&amp;nbsp; Marginal_Percent )) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define cycle/display style(header)={background=azure};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define entity/display style(header)={background=azure};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define case/display style(header)={background=azure};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE cycle;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=azure]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE entity;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=azure]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE case;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=azure]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;*geomeans;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Frequency/display 'N' style(header)={background=PAY};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define GeoMean/display style(header)={background=PAY};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define LowerCLGM/display style(header)={background=PAY};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Frequency;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=PAY]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE GeoMean;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=PAY]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;*Deficient Percent;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Deficient_Frequency/display style(header)={background=GWH};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Deficient_Percent/display style(header)={background=GWH};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Deficient_Frequency;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=GWH]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Deficient_Percent;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=GWH]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;*marginal Percent;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Marginal_Frequency/display style(header)={background=PWH};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;define Marginal_Percent/display style(header)={background=PWH};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Marginal_Frequency;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=PWH]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;COMPUTE Marginal_Percent;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=PWH]");&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;ENDCOMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&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="LLOUKINE_0-1727469967818.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100721i1CDDF512327B7046/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LLOUKINE_0-1727469967818.png" alt="LLOUKINE_0-1727469967818.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 20:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945507#M83661</guid>
      <dc:creator>LLOUKINE</dc:creator>
      <dc:date>2024-09-27T20:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: use of style to apply color to spanned columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945508#M83662</link>
      <description>&lt;P&gt;Very strong suggestion: Only include enough variables to demonstrate the issue.&lt;/P&gt;
&lt;P&gt;Best is to include some data.&lt;/P&gt;
&lt;P&gt;Or use one of the SAS training data sets like SASHELP.CLASS that only has a few observations and variables to start with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consider the following, which is code that you should be able to run as you should have the SASHELP.CLASS data set:&lt;/P&gt;
&lt;PRE&gt;proc format library=work;
value $hdrcolor
      'Student name and sex'='lightgreen'
      'Measurements' = 'gold'
;
run;

proc report data=sashelp.class
   style(header)= [background=$hdrcolor.]
   ;
   columns ('Student name and sex' name sex) ('Measurements' height weight);
   define name /    style=[background=lightgreen];
   define sex /     style=[background=lightgreen];
   define height/   style=[background=gold];
   define weight/   style=[background=gold];
run;
&lt;/PRE&gt;
&lt;P&gt;The format is used to assign a color to the background of any header that has the shown text (which means it may not be the best for ACROSS values). The text appearing in the header must be exactly the same as the text in the first column of the definition for the $hdrcolor format.&lt;/P&gt;
&lt;P&gt;This same approach can be used to modify other characteristics such as the text color, font , font size or other characteristics using multiple formats and the appropriate style element.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used lightgreen instead of azure because on my monitor I have a very hard time seeing if "azure" was even applied.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 21:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945508#M83662</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-27T21:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: use of style to apply color to spanned columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945775#M83667</link>
      <description>&lt;P&gt;Hi Ballardw, Thanks for your suggestion. However, I tried to apply the format as in your example before and it did not work for me. That is why I posted my question. When I run your code below this morning I also do not see that the spanning columns headers are colored according to the format statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LLOUKINE_0-1727789509746.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100775i839B66F91C72073F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LLOUKINE_0-1727789509746.png" alt="LLOUKINE_0-1727789509746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 13:33:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945775#M83667</guid>
      <dc:creator>LLOUKINE</dc:creator>
      <dc:date>2024-10-01T13:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: use of style to apply color to spanned columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945777#M83668</link>
      <description>&lt;P&gt;Please show the LOG from running the Proc format and report. Copy the text from the log including the code and all the messages from both and paste into a text box opened with the &amp;lt;/&amp;gt; icon above the message window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My results:&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" cellspacing="0" cellpadding="3"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c m header" style="background-color: #90ee90;" colspan="2" scope="colgroup"&gt;Student name and sex&lt;/TH&gt;
&lt;TH class="c m header" style="background-color: #ffd700;" colspan="2" scope="colgroup"&gt;Measurements&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c m header" style="background-color: #90ee90;" scope="col"&gt;Name&lt;/TH&gt;
&lt;TH class="c m header" style="background-color: #90ee90;" scope="col"&gt;Sex&lt;/TH&gt;
&lt;TH class="c m header" style="background-color: #ffd700;" scope="col"&gt;Height&lt;/TH&gt;
&lt;TH class="c m header" style="background-color: #ffd700;" scope="col"&gt;Weight&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Alfred&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;69&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;112.5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Alice&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;F&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;56.5&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;84&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Barbara&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;F&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;65.3&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;98&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Carol&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;F&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;62.8&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;102.5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Henry&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;63.5&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;102.5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;James&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;57.3&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;83&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Jane&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;F&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;59.8&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;84.5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Janet&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;F&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;62.5&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;112.5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Jeffrey&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;62.5&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;84&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;John&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;59&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;99.5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Joyce&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;F&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;51.3&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;50.5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Judy&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;F&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;64.3&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;90&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Louise&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;F&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;56.3&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;77&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Mary&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;F&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;66.5&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;112&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Philip&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;72&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;150&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Robert&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;64.8&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;128&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Ronald&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;67&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;133&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;Thomas&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;57.5&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;85&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;William&lt;/TD&gt;
&lt;TD class="l data" style="background-color: #90ee90;"&gt;M&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;66.5&lt;/TD&gt;
&lt;TD class="r data" style="background-color: #ffd700;"&gt;112&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, the bit that your PICTURE shows the words "page break" means that&amp;nbsp; you have sent the output to something besides the results window. Which may mean you need to include any code that did that in case any options there override the default behavior of Proc report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/470018"&gt;@LLOUKINE&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Ballardw, Thanks for your suggestion. However, I tried to apply the format as in your example before and it did not work for me. That is why I posted my question. When I run your code below this morning I also do not see that the spanning columns headers are colored according to the format statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LLOUKINE_0-1727789509746.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100775i839B66F91C72073F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LLOUKINE_0-1727789509746.png" alt="LLOUKINE_0-1727789509746.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 13:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945777#M83668</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-10-01T13:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: use of style to apply color to spanned columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945778#M83669</link>
      <description>&lt;P&gt;here is the LOG for the programm you suggested.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS System 09:27 Tuesday, October 1, 2024&lt;/P&gt;&lt;P&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Program';&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='';&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;8 %LET _SASPROGRAMFILE='';&lt;BR /&gt;9 %LET _SASPROGRAMFILEHOST='';&lt;BR /&gt;10&lt;BR /&gt;11 ODS _ALL_ CLOSE;&lt;BR /&gt;12 OPTIONS DEV=PNG;&lt;BR /&gt;13 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;14 FILENAME EGSR TEMP;&lt;BR /&gt;15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;16 STYLE=HTMLBlue&lt;BR /&gt;17 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome2/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")&lt;BR /&gt;18 NOGTITLE&lt;BR /&gt;19 NOGFOOTNOTE&lt;BR /&gt;20 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;21 ENCODING=UTF8&lt;BR /&gt;22 options(rolap="on")&lt;BR /&gt;23 ;&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;24&lt;BR /&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 proc format library=work;&lt;BR /&gt;27 value $hdrcolor&lt;BR /&gt;28 'Student name and sex'='lightgreen'&lt;BR /&gt;29 'Measurements' = 'gold'&lt;BR /&gt;30 ;&lt;BR /&gt;NOTE: Format $HDRCOLOR has been output.&lt;BR /&gt;31 run;&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE FORMAT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;32&lt;BR /&gt;33 proc report data=sashelp.class&lt;BR /&gt;34 style(header)= [background=$hdrcolor.]&lt;BR /&gt;35 ;&lt;BR /&gt;36 columns ('Student name and sex' name sex) ('Measurements' height weight);&lt;BR /&gt;37 define name / style=[background=lightgreen];&lt;BR /&gt;38 define sex / style=[background=lightgreen];&lt;BR /&gt;39 define height/ style=[background=gold];&lt;BR /&gt;40 define weight/ style=[background=gold];&lt;BR /&gt;41 run;&lt;/P&gt;&lt;P&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;real time 2.39 seconds&lt;BR /&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;42&lt;BR /&gt;43&lt;BR /&gt;2 The SAS System 09:27 Tuesday, October 1, 2024&lt;/P&gt;&lt;P&gt;44 GOPTIONS NOACCESSIBLE;&lt;BR /&gt;45 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;46 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;47 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;48 %LET _CLIENTPROJECTPATHHOST=;&lt;BR /&gt;49 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;50 %LET _SASPROGRAMFILE=;&lt;BR /&gt;51 %LET _SASPROGRAMFILEHOST=;&lt;BR /&gt;52&lt;BR /&gt;53 ;*';*";*/;quit;run;&lt;BR /&gt;54 ODS _ALL_ CLOSE;&lt;BR /&gt;55&lt;BR /&gt;56&lt;BR /&gt;57 QUIT; RUN;&lt;BR /&gt;58&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and RE the picture I just did the screen shot..&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 13:48:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945778#M83669</guid>
      <dc:creator>LLOUKINE</dc:creator>
      <dc:date>2024-10-01T13:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: use of style to apply color to spanned columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945787#M83670</link>
      <description>&lt;P&gt;I'm going to go out on a limb a say that appears to be a BUG in EG 7.1, which was replaced a while ago.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just happen to have an EG 7.1 install that duplicates that output but does not in the other EG 8.3 or Foundation SAS 9.4.7.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Might be something buried in the Tagsets.sasreport13 or the style sheet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suggest trying sending the output to a file such as with ODS RTF, PDF or EXCEL and see the result:&lt;/P&gt;
&lt;P&gt;Replace the "x:\" with a path, starting at a drive or mount point, that is valid in your system.&lt;/P&gt;
&lt;P&gt;Also might consider upgrading to EG 8.3 or later.&lt;/P&gt;
&lt;P&gt;Or run the code in SAS foundation directly instead of EG7.1&lt;/P&gt;
&lt;PRE&gt;ods rtf file="x:\trial.rtf";

proc format library=work;
value $hdrcolor
      'Student name and sex'='lightgreen'
      'Measurements' = 'gold'
;
run;

proc report data=sashelp.class
   style(header)= [background=$hdrcolor.]
   ;
   columns ('Student name and sex' name sex) ('Measurements' height weight);
   define name /    style=[background=lightgreen];
   define sex /     style=[background=lightgreen];
   define height/   style=[background=gold];
   define weight/   style=[background=gold];
run;

ods rtf close;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Oct 2024 14:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945787#M83670</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-10-01T14:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: use of style to apply color to spanned columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945842#M83674</link>
      <description>&lt;P&gt;Unfortunately I cannot update to other version of SAS EG as it is what we have but I will try to look at your other suggestions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 20:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-style-to-apply-color-to-spanned-columns/m-p/945842#M83674</guid>
      <dc:creator>LLOUKINE</dc:creator>
      <dc:date>2024-10-01T20:24:51Z</dc:date>
    </item>
  </channel>
</rss>

