Welldonebacon Welldonebacon - 5 months ago 52
SQL Question

Code SSRS report to format -1 to Yes

I have a SQL query that is displaying "-1" when a selection is made (this is done through an external script writing to the table) I'm wondering if anyone can help me with some code to apply to the SSRS report to auto format this to "Yes"?

Thanks in advance


Two possible solutions I can think of:

  1. Modify the query that returns the data to the report so that it returns the correct string in an additional column depending on the column of your "boolean" column. In the report, display the value of that new column.
  2. Instead of displaying the field value in the report element directly, use an expression for the report element and set it to something like =IIf(DataSet!Field.Value = -1, "Yes", "No").