I am currently designing a report using iReport 4.7.0. At the moment I am trying to figure out how to dynamically adjust the height of a textField, if its contents is too big for the initial height. It seems, that the option Stretch on overflow achieves this. But I am having problems with that.
If a textField is not stretched, the spacing before and after the text is good, because its achieved by setting the textField height higher than the font size. But if the textField gets dynamically bigger because the containing text is to long to display with the initial height, the lines seem awfully packed, there is no spacing whatsoever.
I tried so resolve this by setting Spacing before and Spacing after for the specific textField but this seems to end in JasperReports thinking, that the textField doesn't need to re-size at all, even if the text is not fitting.
Is it possible, that the size created by the Spacing before and Spacing after option is taken into account on calculating, if a textField needs to be resized on overflow? Or am I doing something wrong here?
Use padding:
-or-
This should provide a constant spacing even if box resizes. For complex layouts, experiment with float position of elements, as described here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With