<?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: Coloring turns incorrect when compute column not print in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Coloring-turns-incorrect-when-compute-column-not-print/m-p/546368#M151277</link>
    <description>&lt;P&gt;A bit of a kludge but his seems to work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc report data=HAVE nowd;

	define ID/order noprint;	*NO Display ID --&amp;gt; WRONG COLORING;
	define V1/display;
	define V2/display;

	compute before ID  ; 
	    A=ID;
	endcomp;
 	compute ID ;
		if A=1 then call define(_row_,'style','style={background=VLIGB}'); ELSE
		if A=2 then call define(_row_,'style','style={background=LIGGR}'); ELSE
		if A=3 then call define(_row_,'style','style={background=TAN}'); 
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2019 03:12:52 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2019-03-27T03:12:52Z</dc:date>
    <item>
      <title>Coloring turns incorrect when compute column not print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Coloring-turns-incorrect-when-compute-column-not-print/m-p/546364#M151273</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I don't print the column ID, the coloring turn wrong.&lt;/P&gt;
&lt;P&gt;Can you help me to fix it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id v1 v2;
datalines;
1 2 3
2 2 2
2 2 1
2 0 0
3 1 1
3 1 0
;run;


proc report data=have nowd;

	define id/display;		*Display ID --&amp;gt; CORRECT COLORING;
	define v1/display;
	define v2/display;

	compute id  ;
		IF id=1 then call define(_row_,'style','style={background=VLIGB}'); ELSE
		IF id=2 then call define(_row_,'style','style={background=LIGGR}'); ELSE
		IF id=3 then call define(_row_,'style','style={background=TAN}'); 
	endcomp;
run;

proc report data=have nowd;

	define id/order noprint;	*NO Display ID --&amp;gt; WRONG COLORING;
	define v1/display;
	define v2/display;

	compute id  ;
		IF id=1 then call define(_row_,'style','style={background=VLIGB}'); ELSE
		IF id=2 then call define(_row_,'style','style={background=LIGGR}'); ELSE
		IF id=3 then call define(_row_,'style','style={background=TAN}'); 
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 02:31:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Coloring-turns-incorrect-when-compute-column-not-print/m-p/546364#M151273</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2019-03-27T02:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Coloring turns incorrect when compute column not print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Coloring-turns-incorrect-when-compute-column-not-print/m-p/546368#M151277</link>
      <description>&lt;P&gt;A bit of a kludge but his seems to work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc report data=HAVE nowd;

	define ID/order noprint;	*NO Display ID --&amp;gt; WRONG COLORING;
	define V1/display;
	define V2/display;

	compute before ID  ; 
	    A=ID;
	endcomp;
 	compute ID ;
		if A=1 then call define(_row_,'style','style={background=VLIGB}'); ELSE
		if A=2 then call define(_row_,'style','style={background=LIGGR}'); ELSE
		if A=3 then call define(_row_,'style','style={background=TAN}'); 
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 03:12:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Coloring-turns-incorrect-when-compute-column-not-print/m-p/546368#M151277</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-03-27T03:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Coloring turns incorrect when compute column not print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Coloring-turns-incorrect-when-compute-column-not-print/m-p/546370#M151278</link>
      <description>&lt;P&gt;what a fix! Thanks a lot.&lt;/P&gt;
&lt;P&gt;I am still curious as to why no print ID mess the code up.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 03:55:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Coloring-turns-incorrect-when-compute-column-not-print/m-p/546370#M151278</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2019-03-27T03:55:30Z</dc:date>
    </item>
  </channel>
</rss>

