I have the following data to be printed in the PDF,
101 HARRIER WAY<br>OMVILLE<br>BELLSHIRE<br>OM1 1HA<br>
It needs to be displayed in the following way,
101 HARRIER WAY
OMVILLE
BELLSHIRE
OM1 1HA
But is is printing like the following,
UPDATE:
When I use other text in the place of OMVILLE
say
101 HARRIER WAY<br>HELLO WORLD BANGALORE<br>BELLSHIRE<br>OM1 1HA<br>
it works well. I don't have any idea why it is not working when I give OMVILLE
Code:
<?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="accountStatement" pageWidth="720" pageHeight="1008" columnWidth="680" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isTitleNewPage="true">
<parameter name="address" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<title>
<band height="914" splitType="Stretch">
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="117" y="141" width="297" height="105" isRemoveLineWhenBlank="true"/>
<textElement markup="html">
<font size="9" isBold="false" pdfFontName="Helvetica"/>
<paragraph lineSpacing="Single" tabStopWidth="60"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{address}]]></textFieldExpression>
</textField>
</band>
</title>
</jasperReport>
I am running this code using iReport 4.0.2 and my JasperReports version is 4.
For running the above code use all the input parameters as default values and for address parameter give below one as input.
101 HARRIER WAY<br>OMVILLE<br>BELLSHIRE<br>OM1 1HA<br>
P.S: I am generating the jrxml in PDF format.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…