Unfixed width text in static line - Jasper Reports

So, as I found out after this post: How to stretch a text field relative to the width of the data in Jasper reports , it is impossible to stretch the width of text fields, So I'm trying to establish now, is it possible to insert static text into a text field?

I need to create a script something like this:

"You are a current employer [text without a fixed width], they will contact you shortly."

Can anyone suggest a way to do this in Jasper? I have all the ideas.

+1
source share
1 answer

You want one text field to have this value:

"Your current employer, " + $F{Employer} + ", will contact you soon." 

Or, alternatively, something like this:

 msg("Your current employer, {0}, will contact you soon.", $F{Employer}) 

There are other possibilities ... but these are the most common. In short, this is a common occurrence.

+3
source

Source: https://habr.com/ru/post/1392555/


All Articles