Hide empty tables in KNIME reports

I have the following situation:

At the end of a KNIME workflow I have a table that can be empty (0 rows). The last nodes is a "Data to Report" nodes. In the attached report I want to show the content of the table only if the table is not empty.

At the moment the names of the columns are always shown even if the table is empty.

 

My question:

How can I hide the empty table in the report and how can I show a message like " No Data found" instead of the table? 

Try this one.

- Select the whole table

- In the "Property Editor" below, select the "Visibility" tab

- enable the flag "Hide Element"

- select "For all outputs"

- insert the following condition in the "Expression" box (using the "fx" button)

                           row.__rownum<0

The table now should disappear if empty.

This is great for removing a empty table, but how can I add the text "No Data Found".  Is there a way of adding this text to the report if the table is empty?

You need to include your table in a grid and bind the grid to the same dataset.

In a separate row insert a label and for the grid row use the same Visibility trick with row.__rownum>=0.

If you have no rwos in the data set the grid row will show up. If you have them, the grid row will stay hidden.

Hope this helps

-- Rosaria