如何将子报表的textField高度增加为主报表textField的高度? [英] How to increase subreport's textField height as the height of master report's textField?

查看:120
本文介绍了如何将子报表的textField高度增加为主报表textField的高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想调整子报表的文本字段(在包含到主报表之前),如最高主报表的文本字段。





正如您所看到的,子报表的文本字段的高度不同。

解决方案

你需要使用 stretchType ,你不能以任何其他方式动态设置高度(不考虑通过java代码)



reportElement 标记上,您拥有属性 stretchType ,您可以将其设置为 RelativeToBandHeight RelativeToTallestObject 。我会去:

  stretchType =RelativeToTallestObject

但是这个函数会相对于带内的最大对象拉伸,在你的情况下是子报表中的波段,所以你可能应该反过来考虑这个,因此



在子报表中设置所需的字段大小,然后在主报表中拉伸 textElements ,以匹配子报表的高度。 / p>

I would like to resize subreport's text field (before include into main report) like the highest main report's text field.

As you can see the subreport's text field does not have equal height.

解决方案

You need to work with stretchType, you can't set the height dynamically in any other way (not considering via java code)

On reportElement tag you have the attribute stretchType, which you can set to RelativeToBandHeight or RelativeToTallestObject. I would go for:

stretchType="RelativeToTallestObject"

However this function will stretch relative to largest object in band, which in your case is the band in the subreport, so probably you should think this the other way around, hence

Set desired field size in subreport then stretch the textElements in your main report, to match the height of your subreport.

这篇关于如何将子报表的textField高度增加为主报表textField的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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