Hiding grids/tables in BIRT whith no results from datasource

后端 未结 1 1654
耶瑟儿~
耶瑟儿~ 2021-01-15 05:42

I am having trouble altering a report in birt to meet my teams specifications.

The problem is this: I am generating a report from a jdbc datasource. I am selecting i

相关标签:
1条回答
  • 2021-01-15 06:18

    You can do this using the visibilty tab on the property editor.

    1. On you data table (or the grid containing it if you want to hide the whole grid) go to binding tab.
    2. Add an aggregation with function "COUNT" and select one of the data set fields for the expression.
    3. Go to the properties->Visibilty tab and tick "Hide Element" and in the expression put row["Aggregation"] == 0 replacing the aggregation name if necessary.
    4. Create a 1x1 grid containing a "No data present" label.
    5. Associate the grid with the data set and add the same aggregation as above.
    6. On the Visibility tab click "Hide Element" again, but using row["Aggregation"] != 0 this time.
    0 讨论(0)
提交回复
热议问题