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

时间秒杀一切 提交于 2020-01-03 20:13:30

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/8979543/non-fixed-width-text-in-a-static-string-jasper-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!