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.
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 toRelativeToBandHeight
orRelativeToTallestObject
. I would go for: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.