new line in Text Field

0

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
125
Joined: Feb 18 2011 - 3:10am
Last seen: 10 years 1 month ago

4 Answers:

0

"\n" working. This is best solution.

pavel_dabrowski@wp.pl's picture
Joined: Aug 25 2020 - 6:48am
Last seen: 16 hours 33 min ago
12

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
125
Joined: Feb 18 2011 - 3:10am
Last seen: 10 years 1 month ago
-1

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

Regards

Miguel




Post Edited by mvw at 03/09/2011 01:09
mvw's picture
mvw
3
Joined: Oct 8 2009 - 10:27pm
Last seen: 4 years 2 months ago
1

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

cumanji's picture
11
Joined: Apr 2 2012 - 1:08am
Last seen: 4 years 5 days ago
Feedback
randomness