I am trying to compare the current row value to the previous row value but only within the same group.
I have Group1 (Plant), ChildGroup1 (DeviceTag), Details Group, I have tried this code within the Fill property but it does not work, it just seems to change the color of the first row every time per group regardless of the value of the previous row.
=IIf(Fields!DeviceTag.Value <> Previous(Fields!DeviceTag.Value), "Yellow", "White")
So my data set looks like this:
Plant DeviceTag Description Location A Tag1 ABCD West Tag1 WXYZ West DeviceTag Group 1 _____________________________________________ A Tag2 EFGH East Tag2 IJKL East DeviceTag Group 2 Tag2 IJKL West
In both these DeviceTag Groups, the description changed so I would like to change the color of ABCD to yellow and EFGH to yellow but not WXYZ because it is not in the same group as EFGH. Also the Second row that says East should be Yellow since it is different than the previous West location.
In Crystal Reports you would do:
if {#ChangeCounter}=1 then nocolor else
if currentfieldvalue <> previous({DataSet.Field}) then cryellow else nocolor
Where the formula #ChangeCounter is just 1
Clear as mud??
=IIF(RUNNINGVALUE(Fields!Description.Value, COUNTDISTINCT,"DataSetName") MOD 2 = 0, "Yellow", "White")
Not sure if this is what you are after..... change dataset name accordingly - R_Avery_17=IIf(Fields!DeviceTag.Value = Previous(Fields!DeviceTag.Value), Nothing, "Yellow")
- Alan Schofield