<?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: Color a row but not print a column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Color-a-row-but-not-print-a-column/m-p/546361#M151271</link>
    <description>&lt;P&gt;define N/order noprint;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2019 02:03:26 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2019-03-27T02:03:26Z</dc:date>
    <item>
      <title>Color a row but not print a column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Color-a-row-but-not-print-a-column/m-p/546359#M151270</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code below paint each line a color.&lt;/P&gt;
&lt;P&gt;I use N=_N_ to keep track of the row.&lt;/P&gt;
&lt;P&gt;Clearly, I don't want to print this column N in my report.&lt;/P&gt;
&lt;P&gt;Is there any way to do 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 name $ v1 v2 v3;
datalines;
a 1 2 1
a 3 4 0
b 4 5 0
b 3 5 0
b 1 1 1
c 1 1 0
c 0 0 1
;run;

data have; set have; 
N=_N_;run;

proc report data=have nowd;

	define name/display;
	define v1/display;
	define v2/display;
	define v3/display;
	define N/display;

	compute N  ;
		IF N=1 then call define(_row_,'style','style={background=VLIGB}'); ELSE
		IF N=2 then call define(_row_,'style','style={background=LIGGR}'); ELSE
		IF N=3 then call define(_row_,'style','style={background=TAN}'); ELSE
		IF N=4 then call define(_row_,'style','style={background=WHITE}'); ELSE
		IF N=5 then call define(_row_,'style','style={background=VLIGB}'); ELSE
		IF N=6 then call define(_row_,'style','style={background=LIGGR}'); ELSE
		IF N=7 then call define(_row_,'style','style={background=TAN}'); 
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Mar 2019 01:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Color-a-row-but-not-print-a-column/m-p/546359#M151270</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2019-03-27T01:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Color a row but not print a column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Color-a-row-but-not-print-a-column/m-p/546361#M151271</link>
      <description>&lt;P&gt;define N/order noprint;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 02:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Color-a-row-but-not-print-a-column/m-p/546361#M151271</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2019-03-27T02:03:26Z</dc:date>
    </item>
  </channel>
</rss>

