<?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 Proc Report Stoplighting based on column value comparison in PDF in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Stoplighting-based-on-column-value-comparison-in-PDF/m-p/474415#M71089</link>
    <description>&lt;P&gt;I am working on a reconciliation report and I need to highlight the columns where values are unequal. I am using compute fields to define the formatting. I have tried with temp variables and without. I have attached both versions of my code and a screen shot of what the report looks like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is that my highlighting isn't working as expected. If the two columns do not match then both columns should be read. If the two columns do match then both columns should be green. If you look at the pdf screen shot, you can see that the columns are not highlighting as expected.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jun 2018 13:25:18 GMT</pubDate>
    <dc:creator>tanya_henderson</dc:creator>
    <dc:date>2018-06-29T13:25:18Z</dc:date>
    <item>
      <title>Proc Report Stoplighting based on column value comparison in PDF</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Stoplighting-based-on-column-value-comparison-in-PDF/m-p/474415#M71089</link>
      <description>&lt;P&gt;I am working on a reconciliation report and I need to highlight the columns where values are unequal. I am using compute fields to define the formatting. I have tried with temp variables and without. I have attached both versions of my code and a screen shot of what the report looks like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is that my highlighting isn't working as expected. If the two columns do not match then both columns should be read. If the two columns do match then both columns should be green. If you look at the pdf screen shot, you can see that the columns are not highlighting as expected.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 13:25:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Stoplighting-based-on-column-value-comparison-in-PDF/m-p/474415#M71089</guid>
      <dc:creator>tanya_henderson</dc:creator>
      <dc:date>2018-06-29T13:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Stoplighting based on column value comparison in PDF</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Stoplighting-based-on-column-value-comparison-in-PDF/m-p/474423#M71094</link>
      <description>&lt;P&gt;And what is the problem?&amp;nbsp; Start by presenting some test data in the form of a datastep, and the code which isn't doing what you want, based on that test data.&amp;nbsp; Attached files, and bits of code without data really don't show us anything.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 13:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Stoplighting-based-on-column-value-comparison-in-PDF/m-p/474423#M71094</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-29T13:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Stoplighting based on column value comparison in PDF</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Stoplighting-based-on-column-value-comparison-in-PDF/m-p/475193#M71132</link>
      <description>&lt;P&gt;To achieve the highlighting that you want temporary variables are not necessary.&amp;nbsp;&lt;BR /&gt;PROC REPORT reads in the data in a LEFT to RIGHT direction based on the placement of the variables on the COLUMN statement.&amp;nbsp; In a compute block, if you reference a variable that is to the right of the compute block variable on the column statement, then that referenced variable is missing or blank and the IF condition will never be true.&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;In your compute blocks you are referencing values that PROC REPORT can't see yet.&amp;nbsp; I recommend that you use one compute block.&amp;nbsp; In the COMPUTE statement reference the last variable from the COLUMN statement, rcontcsdt.&amp;nbsp; Within this compute block you use all of the IF and CALL DEFINE statements that you already have.&amp;nbsp; However, you do have to change how to reference the column inside of the CALL DEFINE statement.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;You need something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   compute rcontcsdt;
       if c_guid1 ne rguid1 or missing (c_guid1) then 
           call define('c_guid1','style','style=[background=#fbbcff]');
       else if c_guid1 = rguid1 then 
           call define('c_guid1','style','style=[background=#bcffcd]');
 
     if c_guid2 ne rguid2 or missing (c_guid2)then 
           call define('c_guid2','style','style=[background=#fbbcff]');
       else if c_guid2 = rguid2 then 
           call define('c_guid2','style','style=[background=#bcffcd]');
 
    if c_guid3 ne rguid3 or missing (c_guid3) then 
           call define('c_guid3','style','style=[background=#fbbcff]');
       else if c_guid3 = rguid3 then 
           call define('c_guid3','style','style=[background=#bcffcd]');
...
   endcomp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Please let me know if you have any further questions.&lt;BR /&gt;Thanks,&lt;BR /&gt;Jane Eslinger&lt;BR /&gt;SAS Technical Support&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 14:28:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Stoplighting-based-on-column-value-comparison-in-PDF/m-p/475193#M71132</guid>
      <dc:creator>tanya_henderson</dc:creator>
      <dc:date>2018-07-03T14:28:40Z</dc:date>
    </item>
  </channel>
</rss>

