Sunday, February 19, 2012

Hiding a zero value

How can I hide or suppress the 0-values (zero) in a report?

Use the expression =iif(Fields!FIELDNAME.Value = 0, True, False) at the Visibility expression field in the properties of the textbox.

Kind regards!

Marius

|||

Try this. . .

=Iif(Fields!FIELDNAME.Value = 0, "", Fields!FIELDNAME.Value)

|||

Both options will work.

Thx a lot!

|||You're welcome!|||

Add this function to the custom code field on de report properties:

Code Snippet

Function NoZero(Number as Double)
If Number = 0 Then
Return Nothing
Else
Return Number
End If
End Function

Now you can use this function to suppres zeros in your expression like this:

Code Snippet

=Code.NoZero(Fields!YourField.Value)

No comments:

Post a Comment