JasperReports 中表格下方的空白区域
我正在使用 JasperReports
设计一份报告。它使用表格组件来显示数据。表组件使用JRBeanCollectionDataSource
作为数据源。问题是,当我看到预览时,它会在同一页面上显示多个表格,并且也会创建多个页面,即使我的数据源只返回 4 条记录,我也做了很多搜索,但什么也没找到。
我的报告设计(在iReport
中):
生成的报表,第一页:
和第二个:
I´m designing a report with JasperReports
. That uses a table component to display the data. Table component use JRBeanCollectionDataSource
as dataSource. The thing is that when I see the preview it displays several tables on the same page and it creates several pages too, even though my dataSource only returns 4 records, I have done a lot of search and found nothing.
My report design (in iReport
):
The resulting report, the first page:
and the second one:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来您需要将表格组件放入标题带或摘要带中,这样您就只能得到一张表格。您还可以(或改为)更改主报表查询以返回单行或在主查询没有记录时显示所有行没有详细信息。
It sounds like you need to put the table component into the title band or summary band so you only get one table. You could also (or instead) change the main report query to return a single row or to display All Rows No Detail when the main query has no records.
导致此行为的原因可能有多种:
There could be different reasons causing this behavior: