Sql-server – SSRS 2008 Column Visibility Expression Evaluates to true, column not visible

reporting-servicessql serverssrs-2008

This is not working and it is driving me nuts.

I have in the column visibility the following expression:

=IIF(CInt(Fields!SomeField.Value) > 0,True,False)

The value of "SomeField" is 1. I am able to verify this by looking both at the dataset, and another column I added to the report just to see what the IIF is evaluating to. It evaluates to True.

Shouldn't this make the column show?

Best Answer

I have just tried the following =IIF(Fields!MyID.Value > 0, True, False) in Report Builder and it works fine. Try returning "SomeFieldValue" as an integer either at the database or dataset level.

For instance in your dataset query, cast SomeFieldValue to an int and then in the column visibility expression try:

=IIF(Fields!SomeFieldValue.Value > 0, True, False) 
Related Topic