Monday, March 26, 2012

If Else

All,

looking for help with outputting different text value into a cell.

e.g. a column of a table will only ever have two values, Y & N.

I am looking to populate a CELL within SSRS with Yes or No using a seperate Dataset.

SELECT 'Yes' AS [LookupValue], 'Y' AS LookupCode UNION
SELECT 'No', 'N'

This gives me my two column to lookup which is what I want. However, i need this to populate a cell with Yes instead of Y.

I have tried using it as a parameter but to no avail.

Anyone got any ideas?

Duncan,

Have you tried using the Switch statement instead?

=Switch(Fields!LookUpCode.Value = "Y", "Yes", Fields!LookUpCode.Value = "N", "No")

Hope this helps.

Jarret

No comments:

Post a Comment