stevelackey Posted August 10, 2010 Share Posted August 10, 2010 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 More sharing options...
lucianc Posted August 14, 2010 Share Posted August 14, 2010 The first thing to read is http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/faq.html#FAQ25Also see http://jasperforge.org/projects/jasperreports/tracker/view.php?id=4597, if you're not using JR 3.7.4 try to upgrade.Regards,Lucian 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