1
votes

i'm using Eclipse Birt Designer v4.4.1,

What i would like to do in the report that i'm designing is to add programmatically tables (the same table structure) in my report based on a value that i get from a database query.

Example : if (queryValue = 1) ==> Add one table if (queryValue = 5) ==> Add 5 tables etc ...

Obviously i should add a loop that creates the tables.

Is there a way to do this in Birt Report Designer ?

Thanks.

1
It sounds like what you want to do is use a list item, which will repeat the same table for each result set, - James Jenkins
You should supply more information: What's the use case? The answer depends... As James mentioned, one solution could be a list item if the tables are more or less the same (perhaps with visibility expressions etc to handle differences). Another option (more flexible, but much harder to construct) would be adding the tables with the DE API. But you could do that only in the beforeFactory event, which is a severe restriction. - hvb

1 Answers

0
votes

the easiest way to do this, is to create 2 datasets in the report, the first generate the number of tables and binded to a table element, and the second generate the rows for each table and binded to a table element that is added inside the first table element in the report, and then using the visibility property, we could hide the irrelevant rows.