Jump to content
Changes to the Jaspersoft community edition download ×

Printing & in Jasper


arunize

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

rsilver@bfm.bm wrote:

Can you list the expression in the field along with the exception it throws please?

Robin

My Field is

"<style isBold="true">"+ "GROSS : " + "</style>" + $F{gross}.replaceAll("t", " ")

 

I passed value for gross is

"5.5cms in length & 0.5cms in dia"

 

My Error is

[Fatal Error] :1:102: The entity name must immediately follow the '&' in the entity reference.

09 Oct 2006 10:32:59,550 WARN JRFillTextElement [AWT-EventQueue-0][]: Invalid styled text.

org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.

at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)

at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)

at net.sf.jasperreports.engine.util.JRStyledTextParser.parse(JRStyledTextParser.java:133)

at net.sf.jasperreports.engine.fill.JRFillTextElement.getStyledText(JRFillTextElement.java:453)

at net.sf.jasperreports.engine.fill.JRFillTextElement.getText(JRFillTextElement.java:479)

at

.

.

.

.

.

.

java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)

[Fatal Error] :1:102: The entity name must immediately follow the '&' in the entity reference.

at java.awt.Container.dispatchEventImpl(Container.java:2010)

at java.awt.Window.dispatchEventImpl(Window.java:1774)

at java.awt.Component.dispatchEvent(Component.java:3803)

at

.

.

.

.

Post edited by: arunize, at: 2006/10/09 05:10

Link to comment
Share on other sites

Sorry, i guess i started a new topic about the same issue without searching the forum.

 

I did the same thing replaceAll("&", "&"),

but still got the error. the only difference is that i do this replaceAll in my data source...

 

I'm also confused as to how you were able to show the escape sequence on the forum, since my escape sequence gets converted into an ampersand!

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