new line in Text Field

I pass values in to parameters in to my Jasper report.

This works fine, but it is a very long string and now I would like to add a break so it starts on a new line in the Text Field.

How do I add a break?

“/n” doesn’t work

 

Regards

ttmgybta

ttmgybta's picture
555
Joined: Feb 18 2011 - 3:10am
Last seen: 12 years 7 months ago

4 Answers:

"\n" working. This is best solution.

pavel_dabrowski@wp.pl's picture
Joined: Aug 25 2020 - 6:48am
Last seen: 1 year 6 months ago

Found a solution!

In the properties on the text Field “Markup” to html and in the String adding <br>

For example:

 var myString =  “ My long text <br> this is on the new line”

ttmgybta's picture
555
Joined: Feb 18 2011 - 3:10am
Last seen: 12 years 7 months ago

Use "\\n" and check "Stretch With Overflow"

Regards

Miguel




Post Edited by mvw at 03/09/2011 01:09
mvw's picture
mvw
239
Joined: Oct 8 2009 - 10:27pm
Last seen: 6 years 7 months ago

On the properties window where you edit the text, you can add new line just by pressing enter

cumanji's picture
213
Joined: Apr 2 2012 - 1:08am
Last seen: 6 years 5 months ago
Feedback
randomness