How to give different style properties for a single field?

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 

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

2 Answers:

1

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
2373
Joined: Jul 19 2006 - 5:58pm
Last seen: 2 hours 26 min ago
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
2373
Joined: Jul 19 2006 - 5:58pm
Last seen: 2 hours 26 min ago
Feedback
randomness