How to give different style properties for a single filed?

0

I'm having  Field A and Field B . I want to combine both A & B as single string  and different properties for printing those field

like

A - Arial Normal 

B - Arial Italics Bold 

Is there any possibility that i can get this ? 

 

 

 

 

Thanks in advance,

Selva 

selvakumar.1405130's picture
Joined: Apr 12 2019 - 12:00am
Last seen: 2 weeks 4 days ago

i have used that one in jaspersoft tool it's working fine but when it's converting into pdf where it's showing as normal text i have used Courier New Font 

selvakumar.1405130 - 2 weeks 4 days ago

2 Answers:

1

You could use the simple HTML Syntax for that purpose.

just concat both fields like this: 

$F{FieldA} + "<b><i>" + $F{FieldB} + "</i></b>"

then set the Markup-language property at the textfield to HTML and check the preview. (be aware that there is no bold settings at the textfield itself.... otherwise FieldA would be bold as well of course ;-)

hth + regards

C-Box

C-Box's picture
2250
Joined: Jul 19 2006 - 5:58pm
Last seen: 1 week 4 days ago
0

When you use Arial for the textfield font you will have to create a FontExtension for Arial to embedd this one also in the generated PDF file. (I guess your "courier workaround "doesn't look as wanted!?!? ;-) ) 

hth again + regards

C-Box

 

C-Box's picture
2250
Joined: Jul 19 2006 - 5:58pm
Last seen: 1 week 4 days ago
Feedback
randomness