SSRS Compare two lines (new vs old) and highlight differences / changes

I have a report that gives the current state of an element and the previous state of an element, and I want to display both rows and highlight the differences. For instance:

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 would like to highlight the QTY and TOTAL values, as they have changed. For order 256, I would like to highlight the ADDRESS value.

Does anyone know how I can do this?

Thanks for the bunch in advance!

+4
source share
1 answer

In the properties of the text field, click on the "Fill" tab. For the fill color, enter the expression as follows:

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

Change "GroupID" to your order # and change "Color.Value" to the desired highlight color. Note. This will select only the second line if it differs from the first, and there is no way to select the first line, because there is no "Next" function, only the "Previous" function. You can use this to select either cells that are different, or an entire row.

+3
source

Source: https://habr.com/ru/post/1481418/


All Articles