JasperReports / iReport Designer: Can i show a band conditionally?

前端 未结 1 1601
南旧
南旧 2021-01-22 08:42

I have created a report as follow:

Multiple detail band each detail band contains 1 table. Each table is linked to 1 dataset.

Can I hide the detail band whenever

1条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-22 09:17

    In the "Properties" of each Detail band you have an option called "Print When Expression" there you can place logic that evaluates to boolean.

    When you fill it with your logic and it returns true this detail band is printed.

    So, you will need to have the information if the table will be filled in advance and cannot address the dataset within.

    If your datasets are too different to do this, you should overwrite the Dataset for the main report with a custom one that gathers the information and sets the fields appropriately.

    0 讨论(0)
提交回复
热议问题