travega
travega

Reputation: 8415

Non-fixed width text in a static string - Jasper Reports

So as I have learned since this post: How to stretch a text field relative to data width in Jasper Reports it is not possible to stretch the width of text fields. So I am trying to establish now whether it is possible to embed static text within a text field?

I need to achieve a scenario something like this:

"You're current employer [non-fixed width text] will contact you soon."

Can anyone suggest a way to do this in Jasper? I'm all out of ideas.

Upvotes: 3

Views: 5463

Answers (1)

mdahlman
mdahlman

Reputation: 9390

You want a single Text Field with a value like this:

"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 those are the most common. In short, it's common.

Upvotes: 5

Related Questions