Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If field is NOT null, then hide an object (SSRS Expression)

I have a rectangle.

I want to hide it if a field (X) is NOT NULL.

I tried this but it is not working:

=IIF(NOT IsNothing(Fields!filepath.Value), 1, 0)

I get the error:

An error occurred during local report processing.

The Hidden expression used in rectangle 'ID2398' returned a data type that is not valid.

Anyone know why I'm having this issue?

Do I need to place the actual field onto the report? I tried it but I keep getting the same error.

like image 212
JJ. Avatar asked Dec 14 '22 15:12

JJ.


1 Answers

If you're using that for the Visibility expression, I believe you need to explicitly use True/False rather than 1 or 0. So try:

=IIF(NOT IsNothing(Fields!filepath.Value), True, False)
like image 69
stubaker Avatar answered Jan 24 '23 04:01

stubaker