Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Indicators for Text


Indicators for Text

Author
Message
sharonsql2013
sharonsql2013
SSC-Addicted
SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)

Group: General Forum Members
Points: 406 Visits: 1220
I need to show a Green Indicator if Fieldname!Status.Value is "Yes" and Red for No, How can I achieve this?
pietlinden
pietlinden
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2178 Visits: 12518
Got one to work... The part that tripped me up is that the gauge is expecting a numeric value for the state, so if you pass a string/text to it, it won't work. I started with this dataset

SELECT        1 AS QID, 'Yes' AS Answer
UNION ALL
SELECT 2 AS Expr1, 'No' AS Expr2
UNION ALL
SELECT 3 AS Expr1, 'Yes' AS Expr2
UNION ALL
SELECT 4 AS Expr1, 'No' AS Expr2
UNION ALL
SELECT 5 AS Expr1, 'Yes' AS Expr2



and it didn't work (no numeric value to connect to, because Expression2 is text.)

When I created a calculated value to convert Yes/No to 1/0, then it worked. I attached a super simple example. You could do the calculation for the indicator in your query/stored procedure instead of doing it in the report. I just did it that way to make it self-contained.

I removed the yellow light in my example, since it was mapping yes/no values to green/red.

HTH
Pieter
Attachments
TestIndicator.rdl (0 views, 19.00 KB)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search