Jump to content
Changes to the Jaspersoft community edition download ×

Wrapping text in textfield


broschb

Recommended Posts

I have a textfield that i would like to wrap text in, i have stretch with overflow set to true. The text will continually get truncated. The textfield height is 15, and the band height for that textfield is 17. If is set the band height to double or more the height of the textfield then the text wraps fine, but rows with no wrap don't look as nice. For example if i have the following rows.

 

 

 

1.this is some really

long text that is

wrapping

2.This is some text

 

 

3.more text

 

 

I get white space equal to the height of the num of rows the longest text wraps to. I would like it displayed like this:

 

1.this is some really

long text that is

wrapping

2.This is some text

3.more text

 

Below is the xml:

<detail>

<band height="17" isSplitAllowed="true">

<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self">

<reportElement

x="0"

y="0"

width="226"

height="15"

key="textField"

stretchType="RelativeToTallestObject"

positionType="Float"

isPrintRepeatedValues="false"

isRemoveLineWhenBlank="true"

isPrintWhenDetailOverflows="true"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement textAlignment="Justified" verticalAlignment="Middle">

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{comment}]]></textFieldExpression>

</textField></band>

</detail>

 

thanks,

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...