如何在JasperReport中插入分页符 [英] How to insert a page break in JasperReport

查看:58
本文介绍了如何在JasperReport中插入分页符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个JasperReports模板,带有填充的详细信息带.

I have a JasperReports template, with a filled detail band.

如果我运行报告,则页面数为27(27行明细)

If I run the report, I have a page count of 27 (27 detail rows)

我希望明细行12从新页面开始,所以我必须在pagecount 11之后插入一个分页符.

I want that detail row number 12 begins with a new page, so I have to insert a pagebreak after pagecount 11.

但是我找不到元素"pagebreak"-在Jasper中它叫什么?

第二个问题:

是否还可以修改每个详细信息行的格式(字体,大小等)?

例如:pagecount 1-详细行以sansSerif字体大小10打印,pagecount 2-详细行以Serif字体大小12(粗体)打印,依此类推.....

For example: pagecount 1 - detail row is printed in sansSerif font size 10, pagecount 2 - detail row is printed in Serif font size 12 (bold) and so on.....

第三个问题:

是否可以在字符串中插入制表符?

例如:

名称:" + +汉斯" +"\ n" +

"Name:" + + "Hannes" + " \n" +

城市:" +" +纽约"

"City:" + " " + "New York"

->因此,汉尼斯和纽约应放置在同一位置(左侧留有相同的空间)

-->so Hannes and New York should be placed on the same position (same space from the left side)

推荐答案

第一个问题的答案:

  • Break拖动到Detail波段.选择Page Break.
  • 将其属性Print When Expression设置为$V{PAGE_COUNT}==11
  • Drag Break to Detail band. Choose Page Break.
  • Set its property Print When Expression to $V{PAGE_COUNT}==11

这篇关于如何在JasperReport中插入分页符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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