1

Okay, so I have an SSRS report column-grouped by weeks wait (and sorted by days wait, because weeks wait is a text category field), and a count of the number of people who've been waiting in each cell.

It's been requested that I format text in the 6+ weeks categories red and the remainder green for a quick visual representation of people who've been waiting an acceptable amount of time. So, the font colour is formatted with:

=Iif(Fields!Days_Wait.Value>42,"Red","Green")

However, this only works where the value has associated rows returned from the query. Where there's a count of 0 in the cell, it doesn't have a "Days_Wait" value to look up and so defaults to green.

Short of making the query return a whole load of superfluous empty lines so that every row category/column category combination has a row against it, is there any way to do this? I'm currently stuck with Visual Studio 2005 because the universe is a cold and unforgiving place.

2
  • Is this helpful? msdn.microsoft.com/en-us/library/dd255256.aspx
    – mendosi
    Commented Nov 5, 2016 at 7:33
  • Ah, sorry, I evidently don't have notifications on so didn't see - but I finally found the solution was to reference the category it's grouped by (weeks wait) - it's a little cumbersome because it's a string, but: =Iif( Instr("7-8wks8-9wks...51-52 wks52 wks +",ReportItems!Weeks_Wait.Value) > 0,"Red","Green")
    – angelica
    Commented Nov 30, 2016 at 10:59

1 Answer 1

0

I finally found the solution was to reference the category it's grouped by (weeks wait) - it's a little cumbersome because it's a string, but:

=Iif( Instr("7-8wks8-9wks[...]51-52 wks52 wks +",ReportItems!Weeks_Wait.Value) > 0,"Red","Green")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.