I have a problem with generating .rdlc report. One of the columns has this expression:
IIF(CInt(Fields!MyColumn.Value) = 0 or Fields!MyColumn.Value is nothing,"Unknown",Fields!MyColumn.Value)
IIF(Len(Fields!MyColumn.Value)= 0, "Unknown",Fields!MyColumn.Value )
I've also tried to use that field as a string:
=IIF(IsNothing(Fields!MyColumn.Value) or Fields!MyColumn.Value is nothing,"Unknown",Fields!MyColumn.Value.ToString())
When the value of MyColumn is not NULL, the report displays the value properly, but when it is NULL (or 0 when it's converted into int type) the report returns #Error. The weird thing is that when I remove the if function and display only the value of that field, the report displays 0 or blank (it doesn't return the error). I've tried with both if and switch functions, and get the same error each time. How can I fix this? Thanks
IIF(CInt(Fields!MyColumn.Value) = 0 or Fields!MyColumn.Value is nothing,"Unknown",Fields!MyColumn.Value)
IIF(Len(Fields!MyColumn.Value)= 0, "Unknown",Fields!MyColumn.Value )
I've also tried to use that field as a string:
=IIF(IsNothing(Fields!MyColumn.Value) or Fields!MyColumn.Value is nothing,"Unknown",Fields!MyColumn.Value.ToString())
When the value of MyColumn is not NULL, the report displays the value properly, but when it is NULL (or 0 when it's converted into int type) the report returns #Error. The weird thing is that when I remove the if function and display only the value of that field, the report displays 0 or blank (it doesn't return the error). I've tried with both if and switch functions, and get the same error each time. How can I fix this? Thanks