Jump to content
Changes to the Jaspersoft community edition download ×

Ampersand in field value is filling up logs


moromete1977
Go to solution Solved by szaharia,

Recommended Posts

Hi,

This is a sample textfield in one of my reports.

<textField isStretchWithOverflow="true">
                                    <reportElement key="textHeaderColumn" style="Crosstab Data Text" x="0" y="0" width="96" height="30" forecolor="#FFFFFF"/>
                                    <box leftPadding="0" rightPadding="0"/>
                                    <textElement textAlignment="Left" verticalAlignment="Middle">
                                        <font fontName="Arial" size="11"/>
                                    </textElement>
                                    <textFieldExpression class="java.lang.String"><![CDATA[$V{name}]]></textFieldExpression>
 </textField>

If the $V{name} contains an ampersand, the following will be added in logs (report is rendered correctly, though).

FATAL JRStyledTextParser:1035 - Error parsing styled text.
org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
 

Any solution to not have this in logs?

 

Thanks.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

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