user2582052
user2582052

Reputation: 31

JasperReports: How to print multiple lines with fixed line spacing wrapped in a text field in fixed height without stretch?

What I want to do is to print a sentence in a fixed height text field and show 2 lines only if the sentence is too long.

The setting of the text field is as follows:

Font size: 10px
Height: 22px
Line spacing: 11px
No stretch
Overflow with stretch: false

The text field is put into detail band.

As a result, ling spacing works but the text field still stretch to print all words. I don't know what to do. Please help.

Upvotes: 3

Views: 6365

Answers (1)

ggDeGreat
ggDeGreat

Reputation: 1196

u can fixed the height based on the band height.
first, set the band height then go to your textfield, and change:

Stretch: Relative to band height
Overflow with stretch: false

Upvotes: 1

Related Questions