0

I'm using interactive sorting on multiple columns and would like to change the background colour based on the column being sorted rather than just the little arrow indicator. Does anyone have any ideas?

Thanks

2 Answers2

0

There is no way you can change colors while you do interactive sorting. Instead you can try the conditional formatting in SSRS.

0

It's possible to use the Previous function in a cell's BackgroundColor, but it's not a perfect solution. The following will shade most of a column pink if ascending and green if descending - however the first data row can't be controlled this way (since there's no Next function), and the column will have varying colours if it's sorted by a separate field.

=IIF(IsNothing(Previous(Fields!NUM.Value)), "White",
IIF(Previous(Fields!NUM.Value) > Fields!NUM.Value, "LightGreen",
IIF(Previous(Fields!NUM.Value) < Fields!NUM.Value, "Pink",
"White")))

This is as close as I've managed, so I suspect Ajith is correct.

Pete Rennard-Cumming
  • 1,588
  • 10
  • 19