Reputation: 133
I have to create a report where several tables are diplayed below each other. Each table gets its data from a SubDataset and contains none, one or more rows.
For the first version of the report, I've simply ignored the possibility of a table having no rows and put all tables below each other, each with the height of 1 row. The idea was, that if there is more than one row, the table will grow in height, which seems to work fine. I've given the first table a fixed position and set all subsequent ones to float. In iReport it looks like this:
But when I create a report, only the first table is at the expected position. The rest is displayed too low and overlaps:
Any idea how to fix this? I can't use subreports, because the report is stored in a database so I can't reference other reports. Is there maybe another alternative to subreports or tables?
Upvotes: 6
Views: 8252
Reputation: 1
Try looking into using subreports. I do create table followed by another (datasource is XML).
((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/FUND_STATEMENT/FUNDS/FUND")
Upvotes: 0
Reputation: 9390
You have the "Position Type" property set to "Fix Relative to Top". Change it to "Float".
Upvotes: 7