Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS Comparing 2 rows (new vs old) and highlighting the differences / changes

I have a report which gives the current state of an item, and the previous state of an item and I want to display both rows and highlight the differences. For example:

STATUS    ORDER#   NAME      ADDRESS        QTY       PRICE      TOTAL
new       255      Joe       1 Main St      2          5         10
old       255      Joe       1 Main St      4          5         20  

new       256      Matt      100 Green Ave  5          5         25
old       256      Matt      65 Blue St     5          5         25

So for order 255 I'd like to highlight the QTY and TOTAL values since they changed. For order 256, I'd like to highlight the ADDRESS value.

Does anyone know how I can accomplish this?

Thanks a bunch in advance!!

like image 566
Jay Avatar asked Oct 04 '22 02:10

Jay


1 Answers

In the textbox properties go to the Fill tab. For fill color enter an expression like this:

=iif(Fields!GroupID.Value=previous(Fields!GroupID.Value) 
and Fields!Spouse.Value<>previous(Fields!Spouse.Value) 
,Parameters!Color.Value,Nothing)

Change "GroupID" to be your Order# and change the "Color.Value" to the highlight color you want. Note: This will only highlight the second row when it is different from the first, there is no way to highlight the first row as well because there is no "Next" function, just the Previous function. You can use this to either highlight just the cells that are different or the entire row.

like image 74
StevenWhite Avatar answered Oct 27 '22 10:10

StevenWhite