question

rambonagpur avatar image
rambonagpur asked

SSRS Indicator on 3 status

I have some documents which states are viz. "APPROVED", "NOT APPROVED", "PENDING". Now I want to add an indicator on this 3. e.g. If doc is pending then its indicator colour is 'Yellow' and so on. but I was unable to add the conditions. I studied a lots of URL's but I found only the same eg like use Switch and IIF but where I have to use it?
ssrs-2008-r2
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
WilliamD avatar image
WilliamD answered
If you have a table in your report showing a list of documents, then you can add a column for the coloured state. Once you have the extra column you need to modify the fill colour of the column and use an IIF statement to decide on the colour depending upon the state. Example (going by the field called "Status"): =IIF(Fields!Status.Value) = "NOT APPROVED","Red",IIF(Fields!Status.Value) = "PENDING","Yellow","Green")) This IIF first checks the "Status" value to see if it is "NOT APPROVED". If it is, then the colour is set to red otherwise a new IIF comparison is started checking for "PENDING". If this returns true then the colour is set to yellow and finally if "Status" doesn't match that it will return green. You can change the order of the checks to default to red instead of green, but this should give you a good idea of how to achieve the desired effect. This can of course be used to display a different picture too - I'm unsure if SSRS has built-in traffic lights, but this could be an option too.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Valentino Vranken avatar image Valentino Vranken commented ·
@william As of SQL2008R2, SSRS has got the Indicator. I wrote an article on displaying checkboxes, incl. using the Indicator to do it: http://blog.hoegaerden.be/2012/08/04/displaying-checkboxes-in-an-ssrs-report/
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.