<?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: Erratic background color from compute block in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/635096#M78050</link>
    <description>&lt;P&gt;Glad that you found the solution and that my hint may have helped.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Mar 2020 16:48:26 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-03-26T16:48:26Z</dc:date>
    <item>
      <title>Erratic background color from compute block</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/634921#M78032</link>
      <description>&lt;P&gt;Greetings, I am using the numeric variable _28DayRem to set the background of_28Day.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="4"&gt;proc report data=WORK.QUERY_FOR_FCN4 missing nowd;
	column
		(_28DayRem _28Day);

	define _28DayRem / display ;
	define _28Day / display '28-Day' 
		style(header)={background=white foreground=black};
		compute _28Day;
			if _28DayRem = 0 then call define(_col_,"style",
				"style={background=white foreground=black}");
			else if _28DayRem &amp;lt; 0 then call define(_col_,"style",
				"style={background=Red foreground=white font_weight=bold}");
	  endcomp;
quit;&lt;/FONT&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The colors are not responding to the IF statement, color change should be set when&amp;nbsp;_28DayRem = -25:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-03-25_183712.png" style="width: 143px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37373i931CE6EA671549B3/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-03-25_183712.png" alt="2020-03-25_183712.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 22:40:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/634921#M78032</guid>
      <dc:creator>Espresso</dc:creator>
      <dc:date>2020-03-25T22:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Erratic background color from compute block</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/634924#M78033</link>
      <description>&lt;P&gt;With my made up dummy data the text changes colors. You may have to provide a data step with your exact values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It also isn't possible to tell if the table you posted is the desired output or your actual output. The result you show does have the text appearance change when the value is -25. I'm more concerned about why you 0 values are showing a red background.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 23:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/634924#M78033</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-25T23:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Erratic background color from compute block</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/634931#M78035</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;. With my fake data (shown below), I can cause bad highlighting by NOT accounting for the condition where the value is GT 0, but I get the correct highlighting. There must be something else in your code or your data that is not provided to us. My highlighting works, as shown in Report #2.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="proc_report_highlight.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37375i79F9F351D0D12D3B/image-size/large?v=v2&amp;amp;px=999" role="button" title="proc_report_highlight.png" alt="proc_report_highlight.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 00:04:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/634931#M78035</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-03-26T00:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Erratic background color from compute block</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/634949#M78036</link>
      <description>&lt;P&gt;Thanks for the quick reply and advise. Cool script&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;, love the screenshot &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Honored to have heavy hitters respond, hence my embarrassment and apologies for my mistake...&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="Espresso_0-1585187337590.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37377i76330E2575F415DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Espresso_0-1585187337590.png" alt="Espresso_0-1585187337590.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I had placed this option on a scrip that I include with just about every program as default.&lt;/P&gt;
&lt;P&gt;So now with this change:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Espresso_1-1585190355930.png" style="width: 704px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37378iA3CA3CBD7467BDF9/image-dimensions/704x167?v=v2" width="704" height="167" role="button" title="Espresso_1-1585190355930.png" alt="Espresso_1-1585190355930.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Life's good:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Espresso_2-1585190479641.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37379i401C018E3AEEE15E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Espresso_2-1585190479641.png" alt="Espresso_2-1585190479641.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 02:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/634949#M78036</guid>
      <dc:creator>Espresso</dc:creator>
      <dc:date>2020-03-26T02:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Erratic background color from compute block</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/635096#M78050</link>
      <description>&lt;P&gt;Glad that you found the solution and that my hint may have helped.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 16:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Erratic-background-color-from-compute-block/m-p/635096#M78050</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-26T16:48:26Z</dc:date>
    </item>
  </channel>
</rss>

