在JasperReports中显示彼此之下的表 [英] Displaying tables below each other in JasperReports

查看:94
本文介绍了在JasperReports中显示彼此之下的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须创建一个报告,其中几个表格彼此叠加。每个表从SubDataset获取其数据,并且不包含任何一行或多行。


对于报告的第一个版本,我简单地忽略了表没有行的可能性,并将所有表放在彼此之下,每个表的高度为1行。这个想法是,如果有一行以上,那么桌子的高度会增长,这似乎很好。我给了第一张表一个固定的位置并将所有后续表格设置为浮动。在iReport中它看起来像这样:

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?

推荐答案

您将位置类型属性设置为修复相对于顶部 。将其更改为浮动。

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

这篇关于在JasperReports中显示彼此之下的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆