<?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: Formating a group in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Formating-a-group/m-p/48226#M6265</link>
    <description>Hi:&lt;BR /&gt;
  This is one of those cases where it's hard to visualize the code from your description. Seeing the PROC REPORT code, your COMPUTE block and what the data looks like would be useful. Using COMPUTE block techniques, you can "grab" the value of a GROUP report item in a COMPUTE before...something like:&lt;BR /&gt;
[pre]&lt;BR /&gt;
compute before grpvar;&lt;BR /&gt;
  holdgrp = grpvar;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
And then later, if you want to test the value (as for a CALL DEFINE with _ROW_), you must test the HOLDGRP temporary variable....and not the GRPVAR.&lt;BR /&gt;
 &lt;BR /&gt;
I -think- that's what you're asking about. But seeing your starting code would help.&lt;BR /&gt;
 &lt;BR /&gt;
And, as a teacher, it is my duty to give you this warning: You are going to use ODS to place formatting instructions into an XML file. You plan to open that XML file with Excel. There are some instances where Excel deals with formatting the same way the browser would treat the formatting. There are some instances where Excel ignores your formatting. Generally, I have found that CALL DEFINE formatting is honored in Excel for simple things like background and foreground color and font settings. Since that is what you say you want to do, that should be OK.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia</description>
    <pubDate>Thu, 28 Jan 2010 16:24:49 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-01-28T16:24:49Z</dc:date>
    <item>
      <title>Formating a group</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Formating-a-group/m-p/48225#M6264</link>
      <description>In excelxp I am formating the background color of certain rows.  I would like to set the color for a group.  In this case a summary of earlier rows that is pre calculated.&lt;BR /&gt;
&lt;BR /&gt;
In my compute block I check the value of this column and set the background color.  My problem is that since Proc Report places a blank in subsequent rows for this group, they do not get the format.  Is there any way to set the background color for this entire group?</description>
      <pubDate>Thu, 28 Jan 2010 14:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Formating-a-group/m-p/48225#M6264</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2010-01-28T14:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Formating a group</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Formating-a-group/m-p/48226#M6265</link>
      <description>Hi:&lt;BR /&gt;
  This is one of those cases where it's hard to visualize the code from your description. Seeing the PROC REPORT code, your COMPUTE block and what the data looks like would be useful. Using COMPUTE block techniques, you can "grab" the value of a GROUP report item in a COMPUTE before...something like:&lt;BR /&gt;
[pre]&lt;BR /&gt;
compute before grpvar;&lt;BR /&gt;
  holdgrp = grpvar;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
And then later, if you want to test the value (as for a CALL DEFINE with _ROW_), you must test the HOLDGRP temporary variable....and not the GRPVAR.&lt;BR /&gt;
 &lt;BR /&gt;
I -think- that's what you're asking about. But seeing your starting code would help.&lt;BR /&gt;
 &lt;BR /&gt;
And, as a teacher, it is my duty to give you this warning: You are going to use ODS to place formatting instructions into an XML file. You plan to open that XML file with Excel. There are some instances where Excel deals with formatting the same way the browser would treat the formatting. There are some instances where Excel ignores your formatting. Generally, I have found that CALL DEFINE formatting is honored in Excel for simple things like background and foreground color and font settings. Since that is what you say you want to do, that should be OK.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 28 Jan 2010 16:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Formating-a-group/m-p/48226#M6265</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-01-28T16:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Formating a group</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Formating-a-group/m-p/48227#M6266</link>
      <description>Thanks, that worked.&lt;BR /&gt;
&lt;BR /&gt;
compute before campaign_type;&lt;BR /&gt;
    hold_camp = campaign_type;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
compute attr_comm;&lt;BR /&gt;
     if hold_camp = 'Total' then&lt;BR /&gt;
            call define(_ROW_,'STYLE','style={background=yellow}');&lt;BR /&gt;
     else if  channel = 'All' then&lt;BR /&gt;
            call define(_ROW_,'STYLE','style={background=green}');&lt;BR /&gt;
     else if  attr_camp = 'Total' then&lt;BR /&gt;
            call define(_ROW_,'STYLE','style={background=red}');&lt;BR /&gt;
     else if  attr_comm = 'Total' then&lt;BR /&gt;
            call define(_ROW_,'STYLE','style={background=orange}');&lt;BR /&gt;
 endcomp;</description>
      <pubDate>Thu, 28 Jan 2010 17:36:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Formating-a-group/m-p/48227#M6266</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2010-01-28T17:36:44Z</dc:date>
    </item>
  </channel>
</rss>

