Jump to content
We've recently updated our Privacy Statement, available here ×

Can't use ampersand & in jasper report


Recommended Posts

By: bushrat - bushrat

Can't use ampersand & in jasper report

2006-03-21 15:42

if the text has '&' in it, it prints some garbage in front of the text. As an example:

<style isBold='true' pdfFontName='Times-Bold' size='12'>Black and Gold Emerald-</style>Test summary for Black & Gold Emerald

This is a Jasper report problem/xml bug(As '&' can't appear in literal form). As Jasper report Generates the xml and the xml can't handle '&'. I am trying to fix this Problem by modifying xml code from the .jrxml file. I searched on the web and on the https://sourceforge.net; but Couldn't find how people are solving this problem. Any Solution?

 

 

By: Nacor - nacor

RE: Can't use ampersand & in jasper report

2006-03-22 01:45

Replace the & with:

for static text: &

for textfield: &amp;

but just for fields with styled text on.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...