Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Indicators for Text Expand / Collapse
Author
Message
Posted Tuesday, March 18, 2014 1:58 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 12:34 PM
Points: 223, Visits: 673
I need to show a Green Indicator if Fieldname!Status.Value is "Yes" and Red for No, How can I achieve this?
Post #1552387
Posted Tuesday, March 18, 2014 2:49 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Today @ 9:47 AM
Points: 774, Visits: 4,982
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


  Post Attachments 
TestIndicator.rdl (0 views, 19.65 KB)
Post #1552410
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse