I have a problem, I need to dynamically show the chart according to the user's selection with BIRT. Could anyone tell me how to do that with script? I have created the parameter for the selection.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
The easiest way is to set the visibility property of the chart (or of a grid containing this chart) with an expression using a parameter. This example hides the grid of a crosstab if the value of "View" report parameter equals to "charts".
However this is not the most efficient approach, because if we just turn off the visibility of a report element its datasets are still running silently.
Therefore the best way is to drop elements from beforeFactory script of the report. This sample report makes use of both ways: the crosstab is hidden using visibility property, and the two charts are dropped in beforeFactory. Here is this beforeFactory script:
Please notice the key point is to name report elements we need to drop.