Jump to content

how to bold a few text in text feild


zahron

Recommended Posts

Dear friend,

I newer n just explore ireport v3.0.0. For me this is my first time i used ireport. I have a problem to bold a few data in text feild. I have no problem to bold data using Static text.

 

My sample expression is below:

"Dalam harta pusaka "+$F{TBLPPKSIMATI_NAMA_SIMATI}+" Tarikh Mati: "+$F{TBLPPKSIMATI_TARIKH_MATI}+ " simati."

where this $F{TBLPPKSIMATI_NAMA_SIMATI} and $F{TBLPPKSIMATI_TARIKH_MATI}, i extract from database. So i only want to bold this two data.

 

Please help!

Thank

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

zahron,

 

Refer to the markup example. It ships with iReport here:
C:\Jaspersoft\iReport-Professional-3.6.0\demo\samples\markup

 

I'm not sure if it's automatically included in iReport Community Edition. If not, you can get it as part of the JasperReports project. It works identically in the Pro and Community Editions.

 

You mention being new to iReport. In this case there is no reason to use iReport 3.0.0. You should use iReport 3.6.0.

 

-Matt

Link to comment
Share on other sites

  • 1 month later...

Try something like this in your textfield expression.

"Final result is: <style isBold=\"true\" pdfFontName=\"Times-Bold\">"+$F{X}+"</style>"

Simply replace the X with your actual field name. Also check the "Is styled text" property on the "Font" tab.

Hope this helps!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...