plaidshirtakos Posted July 28, 2020 Share Posted July 28, 2020 I would like to set height of `textField` dinamically. Height should be adjusted automatically according to length of text in it. I set stretchType to RelativeToTallestObject, but I get error message when `Stretch with Overflow option` is true. <textField> <reportElement x="0" y="100" width="550" height="60" uuid=""> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> </reportElement> <textElement textAlignment="Justified" markup="html"> <font fontName="DejaVu Sans" size="10" isBold="false"/> </textElement> <textFieldExpression></textFieldExpression> </textField>[/code] Link to comment Share on other sites More sharing options...
I am Leo Posted July 28, 2020 Share Posted July 28, 2020 <textField textAdjust="StretchHeight"> <reportElement x="0" y="0" width="1520" height="15" uuid="6cb61704-2f0a-4b05-b714-f0219175f001"> <property name="com.jaspersoft.studio.element.name" value="content"/> </reportElement> <box topPadding="35" leftPadding="35" bottomPadding="35" rightPadding="35"/> <textFieldExpression><![CDATA[$F{point4}]]></textFieldExpression></textField>[/code]Just use textAdjust="StretchHeight" in your text field. It's will be stretch base on the content inside. Link to comment Share on other sites More sharing options...
plaidshirtakos Posted July 29, 2020 Author Share Posted July 29, 2020 It has the same effect, whitespace still exists. Link to comment Share on other sites More sharing options...
matthias.budde Posted July 31, 2020 Share Posted July 31, 2020 Just an addition to the answer from I am Leo, because I had some similar problems recently. If your Studio version is < 6.10.0, you need to use<textField isStretchWithOverflow="true">[/code]instead. For versions >= 6.10.0 it needs to be<textField textAdjust="StretchHeight">[/code] Link to comment Share on other sites More sharing options...
eyvind.almqvist Posted September 3, 2023 Share Posted September 3, 2023 I have tried the solution described here,but no effect! I have version 6.20. Yes, the textfield get bigger, but it collides with the text in the textfield under it.How can it be solved? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now