OlliZi answer is not valid if a parameter contains a <br>
, and Kamel's answer is not valid if you don't use the same iReport version... So this is the universal answer in the .jrxml
file.
Add markup="html"
to the used style or in the reportElement
, without using a specific editor. Very usefull for fast and compatible fix.
<textField>
<reportElement x="0" y="0" width="100" height="50" markup="html" />
<textFieldExpression>
<![CDATA["Some text "+ $P{ReportTitle} +" my name +"<br/>"+ is "]]>
</textFieldExpression>
</textField>
Or, if you use a style:
<style name="myStyle" markup="html" />
<textField>
<reportElement x="0" y="0" width="100" height="50" style="myStyle" />
<textFieldExpression>
<![CDATA["Some text "+ $P{ReportTitle} +" my name +"<br/>"+ is "]]>
</textFieldExpression>
</textField>