Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

iReport text field some text in bold not working

 
Tiya Khambadkone
Ranch Hand
Posts: 110
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a textField

$F{X} + " and"


I want the string "and" to be displayed in bold.
I googled and found few answers like : usage of <b> OR

$F{X} + "<style isBold=\"true\" pdfFontName=\"Helvetica-Bold\">Bolt text</style>"

but when the result appears like a normal text : $F{X} <style isBold=\"true\" pdfFontName=\"Helvetica-Bold\">Bolt text</style>

What am I doing wrong?
 
Bruno Pires
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure about your version of IReport, but I'm using the 4.0.0 and it works if you set up the property "Markup" of the Textfield to html.
Then you can use like:
$F{X} + "<b>Bolt text</b>"

att
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic