Hide line - empty field

I have a problem. One of the fields is empty on the line and I want to hide that line.

I have tried the following expressions

=IIF(Fields!CRM_PO_Ref.Value= "",TRUE,FALSE)

=IIF(IsNothing(Fields!CRM_PO_Ref.Value),TRUE,FALSE)

      

I added this expression by right clicking on the TextBoxProperties, under visibility and added the expression. This does not hide the line.

Can anyone please help?

Thanks for the help youre

+3


source to share


1 answer


Setting the visibility of a text box only affects that text box, not the entire line.

There are several ways to get the result you are looking for.

One is to use the Row Visibility property. Right-click the gray row selection box to the left of the table and select Row Visibility. Select the Show or Hide By Expression option and enter your expression.

Another approach is to use the Filters property on a dataset or tablix or row group.



Right-click the dataset and select Dataset Properties, then click Filters in the list. Click Add to add a new filter and enter your expression.

Select Tablix, then right-click on the small gray square in the upper left corner. Click Tablix Properties, then select Filters from the list. Click Add to add a new filter and enter your expression.

Right click on the Row Group row that contains the rows you want to hide using the list at the bottom of the report editor. Click Group Properties, then select the Filters option from the list. Click Add to add a new filter and enter your expression.

A few notes on expression. First, the expression should only return true or false, so placing it in IIF()

is redundant. The type expression =Fields!CRM_PO_Ref.Value = ""

is adequate. The second thing to note is that the value True

for the row visibility function will hide the row, and the result True

in the filter will include the row. You may need to invert the result of an expression by overriding it with a keyword Not

or by inverting the comparison operator.

+4


source







All Articles