Jasper报告子页面在新页面上 [英] Jasper Reports subreport on a new page
问题描述
我有一个由6个子报告组成的jasper报告。这些子报表中的每一个都有自己的标题部分。现在我需要在新页面上开始每个报告。我尝试添加分页符,但它对我不起作用。
I have a jasper report that consists of 6 subreports. Each of these subreports has its own title section. Now I need each report to start on the new page. I tried adding page breaks but it did not work for me.
在研究这个问题时,我突然想到将 isTitleNewPage
设置为 true
at
http://www.dzone.com/snippets / JasperReports的-报表 - 新。所以我将属性 isTitleNewPage =true
添加到所有子报表中,但现在子报表的标题仍保留在上一页上,并且该子报表的详细信息和摘要显示在新页。
While researching the problem I cam across a trick to set isTitleNewPage
to true
at
http://www.dzone.com/snippets/jasperreports-subreport-new. So I added the attribute isTitleNewPage="true"
to all the subreports, but now the subreport's Title remains on the previous page and Details and Summary of that subreport are being displayed on a new page.
我怎样才能解决这个问题?
How can i solve this problem??
推荐答案
最简单的解决方案是将 runToBottom
标志设置为 true
在子报告标签中。
Simplest solution is to set runToBottom
flag to true
in subreport tags.
<subreport runToBottom="true">
这会强制子报表填充整个页面,因此下一个子报表将在新页面上启动。
This forces the subreport to fill the whole page, so the next subreport will start on a new page.
标记 isTitleNewPage
不会这样做,因为就像你注意到的那样,它会将子报表的标题带拆分为其余的子报告内容(除非你使用空白的标题带)。
Flag isTitleNewPage
won't do the trick because like you noticed, it will split the subreport's title band with the rest of the subreport content (unless you're using a blank title band).
这篇关于Jasper报告子页面在新页面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!