How to give different style properties for a single field?

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 

Selva_ms7's picture
337
Joined: Apr 12 2019 - 12:00am
Last seen: 3 months 1 week 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 

Selva_ms7 - 3 years 10 months ago

2 Answers:

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
23949
Joined: Jul 19 2006 - 5:58pm
Last seen: 3 weeks 5 days ago

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
23949
Joined: Jul 19 2006 - 5:58pm
Last seen: 3 weeks 5 days ago
Feedback