Jump to content

Problem while displaying '<' in report


Shankar_24684

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

It doesnt work if you mix "<" or ">" with another html tag (eg <font size =3> </font>)

I had the same error..

In my case, i was trying to use < or > with bold.

"<" and ">" are interpreted as a html tag creating the following error:

"ERROR [sTDERR] [Fatal Error] :3:2: The content of elements must consist of well-formed character data or markup."

Link to comment
Share on other sites

thiego,

 

you can't use the GREATER THAN and LESS THAN characters directly in the fields... you have to use the html character entity for those two characters and other characters such as the ampersand. refer to my previous post in this thread. i have placed a link to w3schools in case you want to learn about how to display other special characters.

 

honestly, i am not sure if iReport/JasperReports has a feature that filters special characters and translates them into their printable form.... that would be cool if they had that. anyway, if you need to display text taken from a datasource (text that you don't intend to scan completely for special symbols), the only solution that i know of is to create an application (java or other language) that will scan the text for special characters and convert the special characters into their corresponding character entities.

 

i'm sure someone out there already has a fix for this... or at least has an idea of how to work around this issue.

 

hth

 

 

edwin

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