0

My requirement is that I have to display some characters in a string as bold ex " WelcomeTOJasper " Just like this sting I have rendered the output in jprint,

This is what I used,

"<textElement markup="html">
<font fontName="SansSerif"/>
</textElement>
<textFieldExpression><![CDATA["<b>"+$F{COLUMN_4}.substring(0, 5)+"</b>"+$F{COLUMN_4}.substring(5,$F{COLUMN_4}.length())]]></textFieldExpression>"

to achieve my expected output in jprint viewer, While exporting the same as PDF I am not able to get the same expected output in PDF.

Can you Please help me what properties should I set or change in jrxml to get the same output in PDF .

Alex K
  • 22,315
  • 19
  • 108
  • 236
Deepak S
  • 1
  • 1
  • Possible duplicate of [Style a text field in JasperReports](http://stackoverflow.com/questions/8135215/style-a-text-field-in-jasperreports) – Alex K Jul 03 '16 at 10:33

1 Answers1

0

Set Element Markup as below in the jrxml file,

textElement markup="styled"

And Pass the String arguments as below,

$F{COLUMN_3}.substring(0,4) + "" + $F{COLUMN_3}.substring( 4, 9) + "" +$F{COLUMN_3}.substring(9,$F{COLUMN_3}.length())

Deepak S
  • 1
  • 1