How to increase subreport's textField height a

2019-07-26 20:56发布

问题:

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.

回答1:

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.