danielo.developer Posted March 12 Share Posted March 12 I have two fields I want to combine into one field. One field is a label, and the other is a free form field. For example: PO: 123&ABC With "PO:" being the label and "123&ABC" being the free form section. I would like for the label to be bold and the free form to not be bold and I want these both with a single text field. For example, $F{LABEL1}+" "+$F{FREE_FORM1}. I have tried using the markup of html; however, when an end user types in an & or % in the free form field it causes the markup to be ignored and instead of seeing: PO: 123&ABC you see <b>PO</b> 123&ABC Is there a way to accomplish what I'm asking with Jasper Studio w/out having to split up the two fields into two different text fields? Link to comment Share on other sites More sharing options...
Solution danielo.developer Posted March 12 Author Solution Share Posted March 12 Never mind. I've answered my own question. If you have the field set to "Styled" it does not work, but if you set it to use html markup (which is what I thought I had it set) it does work. Link to comment Share on other sites More sharing options...
yassine-benkiiiiiiiiiiiiii Posted March 21 Share Posted March 21 <textField> <reportElement x="-11" y="3" width="586" height="597" uuid="6142344b-e776-4f12-832d-c9d8da9de0d0"/> <textElement markup="html"> <font size="10" isBold="false"/> </textElement> <textFieldExpression><![CDATA["<font color='blue'><b>" + $F{LABEL1} + "</b></font>" + $F{LABEL2}]]> </textFieldExpression> </textField> voila PO en gras et en bleu si tu veux meme utiliser les couleurs. NB: n'oublie pas html markup: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now