Jump to content

Problem with Wrapping Text


stevelackey

Recommended Posts

We are having a display problem with certain text that wraps within a field in PDF documents.  In some cases, text is being chopped off of the end of the field.  We've noticed that the problem happens when a text field has HTML super script tags (<sup> </sup>).  But the problem does not always occur with super script tags - some data fields with super script tags display fine.

We are using JasperReports 3.7.4.  We are running on an AIX server and sending PDF's to a browser.  The problem happens with both FF and IE.

I've included a code snippet below.  The problem field is the field that starts at "x=0".

I've also attached the .jrxml file.

Code:
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">				<reportElement stretchType="RelativeToTallestObject" x="0" y="3" width="166" height="10">					<printWhenExpression><![CDATA[!$P{PRODUCT}.isAwp()]]></printWhenExpression>				</reportElement>				<textElement markup="html">					<font fontName="Arial" size="8" isPdfEmbedded="true"/>				</textElement>				<textFieldExpression class="java.lang.String"><![CDATA[com.lfg.afpq.util.PresentationUtils.getInstanceHtml().getFundName($P{PRODUCT}, $F{pfl})]]></textFieldExpression>			</textField>			<textField pattern="" isBlankWhenNull="false">				<reportElement stretchType="RelativeToTallestObject" x="212" y="3" width="32" height="10"/>				<textElement textAlignment="Center">					<font fontName="Arial" size="8" isPdfEmbedded="true"/>				</textElement>				<textFieldExpression class="java.lang.String"><![CDATA[com.lfg.afpq.util.PresentationUtils.formatValue($F{dailyChange},"0.00;-0.00",2)]]></textFieldExpression>			</textField>			<textField isStretchWithOverflow="true" isBlankWhenNull="true">				<reportElement stretchType="RelativeToTallestObject" x="0" y="3" width="134" height="10" forecolor="#000000">					<printWhenExpression><![CDATA[$P{PRODUCT}.isAwp()]]></printWhenExpression>				</reportElement>				<textElement markup="html">					<font fontName="Arial" size="8" isPdfEmbedded="true"/>				</textElement>				<textFieldExpression class="java.lang.String"><![CDATA[com.lfg.afpq.util.PresentationUtils.getInstanceHtml().getFundName($P{PRODUCT}, $F{pfl})]]></textFieldExpression>			</textField>
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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