Jump to content
Changes to the Jaspersoft community edition download ×

TextField stretches and Overlaps

Recommended Posts

By: Karan - karanmg

TextField stretches and Overlaps

2006-07-07 16:07

I know this subject seems to have been beaten to death in the forums, yet I have to post this message. I have gone over a lot of messages in the forums, the Tutorials, FAQs, Google, and tried all I could, but I am not able to solve the problem below. Also, I am somewhat new to JasperReports, began using it last week.


I have a report with quite a few textfields in the detail band. Among these is one for "Detail Description" which may or may not contain a large amount of text. If it does not contain a lot of text, the data shows up fine in the report (PDF). However, if the amonut of text is large, and the textfield needs to stretch, then it stretches and overlaps the fields and labels below to accomodate that data. The elements below the Detail Description textfield, do not shift down to accomodate the stretching of the textfield.


Here is the XML snippet for this field:

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


<reportElement mode="Transparent"

x="75" y="83" width="679" height="27" forecolor="#000000" backcolor="#FFFFFF"

key="textField-22" isPrintRepeatedValues="false"/>


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


<textElement textAlignment="Left" verticalAlignment="Top" rotation="None">


<font fontName="Arial" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />




<textFieldExpression class="java.lang.String">






If I set Evaluation Time to "Report" or "Band" or anything except "New" then the text in the field is truncated, and the textfield does not stretch at all.


Config: Windows XP, Jasper 1.2.4 and IReports 1.2.4.







By: Karan - karanmg

RE: TextField stretches and Overlaps

2006-07-07 16:20

I got it!

I set all elements below the "Detail Description" textfield to "Float" and then they shift down!


Hope this helps someone.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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...