new line character

Hi

I am using jasperreport 1.3.4, I am trying to display a text field using
<textFieldExpression class="java.lang.String"><![CDATA[$P{headerLabel}]]></textFieldExpression>

in which, the headerLabel parameter will have a value like: "Test Case". I want to display it in two lines, so I replaced the space with "\\n", "\\r", or "\\r\\n". None of them work - it ends up only display the first word "Test".

Can anybody help?

Thanks!!
Post edited by: jingc3, at: 2007/07/15 23:27
jingc3's picture
71
Joined: Jun 25 2007 - 5:50am
Last seen: 16 years 3 months ago

2 Answers:

It is working by inserting "\r\n" (with backslash). it was the band height not enough :P
jingc3's picture
71
Joined: Jun 25 2007 - 5:50am
Last seen: 16 years 3 months ago
hi,
As your text field's height is big enough you can use
this style to accomplish this effective
"good"+"(backslash)n"+"morning"

the attachment is a sample.

hope to help you!

cheng.ken [file name=new_line_character.jrxml size=3263]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/new...

Post edited by: Cheng.Ken, at: 2007/07/16 10:13
Post edited by: Cheng.Ken, at: 2007/07/16 10:14
xwcheng's picture
562
Joined: Mar 1 2007 - 1:56pm
Last seen: 16 years 7 months ago
Feedback
randomness