skhayatt
(Sam Khayatt)
October 13, 2023, 5:19pm
1
Having a small problem with the logic for the Hidden property. Probably not specific to Hidden, but that is where I am using it.
We have added tracking number to the AR invoice.
The expression that is displayed in the header is:
="Tracking Number: " & First(Fields!ShipHead_TrackingNumber.Value)
We prefer to have nothing displayed if there is no tracking number, so the Hidden property is set to:
=IIf(IsNothing(First(Fields!ShipHead_TrackingNumber.Value)) = True,True,False)
This, to me, says that if ShipHead_TrackingNumber is Null, hide the expression. However, what we are seeing is "Tracking Number: ".
How do I hide the whole expression?
1 Like
I think the IsNothing expression is going to give you your Boolean for the Iif expression. Therefore, the = TRUE is not needed. Have you tried without this?
skhayatt
(Sam Khayatt)
October 16, 2023, 2:37pm
3
The code below returns the same: "Tracking Number " without any data
=IIf(IsNothing(First(Fields!ShipHead_TrackingNumber.Value)),True,False)
Okay cool. So perhaps the data is coming across as ‘Blank’ rather than NULL. Have you tried an expression for ‘Blank’ evaluation as opposed to or including NULL?
1 Like
skhayatt
(Sam Khayatt)
October 16, 2023, 2:51pm
5
And the winner is…
=IIf(First(Fields!ShipHead_TrackingNumber.Value) = “”,True,False)
Thanks @Michael_Ramsey for helping me think about it.