0

I have a column in SSRS report. The value is "True" or "False" or "Yes" or "No" or "1" or "0"

Instead of showing that in that column, I would like to use indicator.

I placed indicator in that column but need to set start and end property. How do I go about doing it so I can show green checkmark when it's "True", "Yes", or '1" and red otherwise?

I am trying =IFF(Fields!Column_name.Value = "True", "Red", "Green") for the Start value for Green Check mark...but obviously I am wrong...

any help?

John Smith
  • 187
  • 1
  • 5
  • 12

2 Answers2

2

Well maybe its just a typo in your question but a couple things stand out

  • the function is IIF, not IFF
  • The True result should come first after the condition

I've never used the indicators before, but looking briefly at them, it looks like you can define ranges that are acceptable (green), unacceptable(red), or in the middle (yellow).

Start and End should probably be numeric values, "Green" and "Red" don't seem like valid values.

Try binding the indicator value expression to something like this.

=IIF(Fields!ColumnName.Value = "True" OrElse
    Fields!ColumnName.Value = "Yes"  OrElse
    Fields!ColumnName.Value = "1", 100, 0)
King
  • 339
  • 1
  • 5
  • I tried putting the following expression for RED indicator's START expression = "=IIF(First(Fields!Name.Value, "DataSet1"),'False',100,0)" and GREEN indicator's Start expression = "=IIF(First(Fields!Name.Value, "DataSet1"),'True',100,0)" it doesn't work I left the END values empty. The column contains "True" and 'False" strings. I want to show Red indicator for when the string = True and Red indicator when the string is False. Thank you – John Smith Jul 20 '12 at 13:00
  • No, put it in the Indicator value expression. Leave START and END expressions thier defaults (ex. 66 start-100 end for green). – King Jul 23 '12 at 16:05
  • Yep I just came across this, BIT type was coming out true, not 1. @King you are correct. I actually missed that there was an "expression" button ... Anyway, my final expression was: IIF(Fields!MyVal.Value = True, 1, 0). I used 2 indicators, a red one that ranged from 0 to 0 and a green one that ranged from 1 to 1. This gave me a boolean value and indicator for each record in the data set. – emery.noel Jul 20 '17 at 18:34
1

Go to the Indicators properties > Values And States and put the Check's Start & End Value to 1. And the X put it's Start & End Value to 0.

Then write your expression like this:

=iif(First(Fields!YourField.Value, "YourDataSet")=True,1,0)

That should give you a Check if checked or an X if not.

Jason MacDonald
  • 109
  • 1
  • 3