jasperreport position type 详解

问题


由一个问题展开,以下是设计的报表模板,三个文本position type都是相对top固定(fix relative to top)

jasperreport position type 详解_第1张图片


问题来了,第二行内容很多,在扩展的情况下,显示不正常,如下图

jasperreport position type 详解_第2张图片


可以看到,

第一行显示正常。

第二行由于内容太多扩展了。

第三行位置是相对top固定(fix relative to top),所以,仍然在原位置。


解决


由此,我们大胆的推断,将position type改为relative to bottom或者float就可以显示正常



jasperreport position type 详解_第3张图片


顺便说一句,改为float也可以work的


总结


fix relative to top: 控件与所在band的top距离

fix relative to bottom:控件与所在band的bottom距离
float:浮动,类似css中的浮动,紧紧靠在上边控件的下方

你可能感兴趣的:(jasperreport position type 详解)