<?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: How to customize the background color for a row using Excelxp in a proc rep in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-customize-the-background-color-for-a-row-using-Excelxp-in/m-p/23952#M4071</link>
    <description>Hi Tim&lt;BR /&gt;
When I put compute x, it put color(background blue) for all rows. But my interest in  only the row when x='b'. Thanks a lot for your help.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks &lt;BR /&gt;
&lt;BR /&gt;
Inp</description>
    <pubDate>Thu, 28 Oct 2010 01:27:13 GMT</pubDate>
    <dc:creator>Inp</dc:creator>
    <dc:date>2010-10-28T01:27:13Z</dc:date>
    <item>
      <title>How to customize the background color for a row using Excelxp in a proc rep</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-customize-the-background-color-for-a-row-using-Excelxp-in/m-p/23950#M4069</link>
      <description>Hi Dear,&lt;BR /&gt;
&lt;BR /&gt;
Here is my coding. I want to add background colour blue for the row when the value of x = 'b' . My coding seems running without error but I don't see the background color.  Can you please let me know how I do it. I am using SAS 9.2 and on Windows XP.&lt;BR /&gt;
&lt;BR /&gt;
data temp1;&lt;BR /&gt;
input @1 x $1. @2 y  $1. @3 z $1.;&lt;BR /&gt;
cards;&lt;BR /&gt;
abc&lt;BR /&gt;
abd&lt;BR /&gt;
abf&lt;BR /&gt;
abc&lt;BR /&gt;
abw&lt;BR /&gt;
acw&lt;BR /&gt;
acq&lt;BR /&gt;
bcd&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ODS LISTING CLOSE;&lt;BR /&gt;
ods tagsets.excelXP path='c:\'   file="mytest.XLS"  style=newstyle rs= none;&lt;BR /&gt;
&lt;BR /&gt;
TITLE " my title " ;&lt;BR /&gt;
ods tagsets.excelXP options(&lt;BR /&gt;
						  Sheet_Name="mytes"&lt;BR /&gt;
						  Absolute_Column_Width='30,30,10'&lt;BR /&gt;
						 );&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc report data=temp1 nowd ;&lt;BR /&gt;
column x y z;&lt;BR /&gt;
define x / order ' x';&lt;BR /&gt;
define y / order 'y';&lt;BR /&gt;
define z / 'z';&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
compute after x;&lt;BR /&gt;
if x='b' then ;&lt;BR /&gt;
call define (_row_ ,'style','style={background=blue}');&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
ods LISTING;</description>
      <pubDate>Wed, 27 Oct 2010 18:49:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-customize-the-background-color-for-a-row-using-Excelxp-in/m-p/23950#M4069</guid>
      <dc:creator>Inp</dc:creator>
      <dc:date>2010-10-27T18:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to customize the background color for a row using Excelxp in a proc rep</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-customize-the-background-color-for-a-row-using-Excelxp-in/m-p/23951#M4070</link>
      <description>Use&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
compute x;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
instead of&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
compute after x;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
The latter statement alters the row &lt;I&gt;after&lt;/I&gt; the row when the value of x = 'b', and there is no such row.</description>
      <pubDate>Wed, 27 Oct 2010 19:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-customize-the-background-color-for-a-row-using-Excelxp-in/m-p/23951#M4070</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2010-10-27T19:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to customize the background color for a row using Excelxp in a proc rep</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-customize-the-background-color-for-a-row-using-Excelxp-in/m-p/23952#M4071</link>
      <description>Hi Tim&lt;BR /&gt;
When I put compute x, it put color(background blue) for all rows. But my interest in  only the row when x='b'. Thanks a lot for your help.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks &lt;BR /&gt;
&lt;BR /&gt;
Inp</description>
      <pubDate>Thu, 28 Oct 2010 01:27:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-customize-the-background-color-for-a-row-using-Excelxp-in/m-p/23952#M4071</guid>
      <dc:creator>Inp</dc:creator>
      <dc:date>2010-10-28T01:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to customize the background color for a row using Excelxp in a proc rep</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-customize-the-background-color-for-a-row-using-Excelxp-in/m-p/23953#M4072</link>
      <description>Hi:&lt;BR /&gt;
  I would recommend that you review your IF statement syntax. This code:&lt;BR /&gt;
[pre]&lt;BR /&gt;
compute x;&lt;BR /&gt;
if x='b' then ;&lt;BR /&gt;
call define (_row_ ,'style','style={background=blue}');&lt;BR /&gt;
endcomp;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                 &lt;BR /&gt;
specifically&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;B&gt;if x='b' then;&lt;/B&gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
            &lt;BR /&gt;
is incorrect. It should be either (no semi-colon after 'then'):&lt;BR /&gt;
[pre]&lt;BR /&gt;
compute x;&lt;BR /&gt;
if x='b' then &lt;BR /&gt;
   call define (_row_ ,'style','style={background=blue}');&lt;BR /&gt;
endcomp;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                           &lt;BR /&gt;
OR  (use do/end construction with the IF)&lt;BR /&gt;
  &lt;BR /&gt;
[pre]&lt;BR /&gt;
compute x;&lt;BR /&gt;
if x='b' then do;&lt;BR /&gt;
   call define (_row_ ,'style','style={background=blue}');&lt;BR /&gt;
end;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
         &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 28 Oct 2010 02:57:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-customize-the-background-color-for-a-row-using-Excelxp-in/m-p/23953#M4072</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-10-28T02:57:54Z</dc:date>
    </item>
  </channel>
</rss>

