I've just started using Jasper Reports to generate reports from data retrieved using Hibernate. Everything is working, except JR doesn't seem to respect newline characters (\n) in text fields. Is there a way to force line breaks at newline characters?
+1
A:
Try this: set the isStyledTex
to true (tick it).
Than, when you whant to break the line:
text + "<br/>" + newLineText
Hope it helps you.
Thanks that works :). I had a similar problem were I had to display some preformatted text within a textElement and had problems with the unix and windows EOLs.
shyam
2009-12-30 09:23:56
A:
hasn't isStyledText attribute been deprecated for 3.0.0+? is there any option other than that?
Elijah
2010-05-04 12:18:36
A:
If you use iReport, you can select the static text area. In the right column you will find the properties of that object. Under "Static text properties -> Text" you will find your text. Click onto the button [...] so that a window opens where you can enter your text including line breaks.
vespa
2010-08-31 14:56:58