Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying tables below each other in JasperReports

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:

enter image description here



But when I create a report, only the first table is at the expected position. The rest is displayed too low and overlaps:

enter image description here



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?

like image 671
Johannes Avatar asked Feb 10 '12 14:02

Johannes


1 Answers

You have the "Position Type" property set to "Fix Relative to Top". Change it to "Float".

like image 126
mdahlman Avatar answered Oct 31 '22 23:10

mdahlman