iReport子报告除以分页符 [英] iReport subreport divided by a page break

查看:417
本文介绍了iReport子报告除以分页符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

子报表有两个 Detail 波段,第一个是Title,第二个是另一个子报表。
这些乐队在两页上相互分开。

The subreport has two Detail bands, the first is "Title" and the second is another subreport. These bands are divided from each other on two pages.

我尝试了许多没有结果的属性作为忽略分页和分裂允许

I tried a lot of properties without result as "ignore pagination" and "split allowed"

我的问题是:如何强制ireport不要将我的子报表分成两页?

My question is: How can I force ireport not to split my subreport on two pages ?

我有一些截图:

主报告:

子报告:

另一个子报告:

生成的 pdf 文件如下所示:

推荐答案

不是在主子报表中使用两个波段,而是将标题和第二个子报表放在同一个波段中。然后将该单个波段的 splitType 设置为Prevent。这样,标题和数据将保持在一起,如果数据不适合页面,则在标题之前发生拆分。

Instead of using two bands in the principle subreport, put the title and the second subreport into the same band. Then set the splitType for that single band to "Prevent". That way, the title and data will be kept together and the split will happen before the title if the data will not fit on the page.

将标题放入详细信息区域将使其重复每组数据。要防止这种情况,请将 printWhenExpression 更改为 $ V {REPORT_COUNT} == 1 。这将导致它仅为第一个记录打印一次,而不是每个后续循环通过数据源打印。

Putting the title into the detail band will make it repeat with each set of data. To prevent this, change the printWhenExpression to $V{REPORT_COUNT} == 1. This will cause it to be printed only once, for the first record, and not for each subsequent loop through the datasource.

这篇关于iReport子报告除以分页符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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