Show or hide a report element

Make report elements conditionally invisible by using the Visibility Condition property.

  1. In the report, select the element.
  2. In the Properties view, edit the Visibility Condition property.
    For example, you don't want the email field to display if its value is empty, so you set the visibility condition as follows:
    email.trim().length()>0

    If the expression evaluates as TRUE, the field displays. If the expression evaluates as FALSE, the instance of the element is removed from the report, as are all its children. If you are using relative positioning, all sibling elements after this element in the report structure shift accordingly, reclaiming the space that the element would have occupied.