ivan-lau Posted October 21, 2014 Share Posted October 21, 2014 The last line of a data field (Text Field) is missing if the following criteria are fulfilled (JasperReport version 5.6):1. Font of the field is MingLiU/PMingLiU2. Font size less than 103. Data field contains data more than 5 lines4. Set "Stretch With Overflow" to true5. Render to PDFIt seems that the field height is calculated incorrectly when the text field is overflow such that the last line does not have sufficient space for display. The problem can be easily reproducible with the below template.The only thing that I can get around with this problem is to use font size greater than 9 when using Chinese character.Font MingLiU with Size = 10. All ten lines could be displayed.Font MingLiU with Size = 9. The last line (line10) could not be displayed.Am I missing something? Or is it a bug? Thank you in advance for any help. <?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ireportv5_6" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="1a5a364a-4d02-41d2-b274-3bebea8e6ebb"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString language="xPath"> <![CDATA[/form]]> </queryString> <field name="data1" class="java.lang.String"> <fieldDescription><![CDATA[data1]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"/> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="49" splitType="Stretch"> <textField isStretchWithOverflow="true"> <reportElement x="227" y="0" width="100" height="20" uuid="b6b09c92-23a2-4b66-b0c2-6f85a3f5bc76"/> <textElement> <font fontName="MingLiU" size="9"/> </textElement> <textFieldExpression><![CDATA[$F{data1}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="111" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport> 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