Hello Jasper's!
Since I got the new Version of iReport , I have always troubles when I open an existing and saved Report, wich worked without any problems. After opening, some of the properties have "null"-values, which makes, that the Report is not executable. The Problem is only visible in the XML-view, here an example:
<staticText>
<reportElement key="BSP-Ueb" mode="Transparent" x="48" y="40" width="256" height="46" forecolor="#003F87" backcolor="#FFFFFF"/>
<box>
<topPen lineWidth="0.0" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineColor="#000000"/>
</box>
<textElement textAlignment="null" rotation="None" lineSpacing="Single">
<font fontName="GI16-Medium" size="30" isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false" pdfFontName="GI16MedIta.ttf" pdfEncoding="Cp1252" isPdfEmbedded="true"/>
</textElement>
<text><![CDATA[Bausparvertrag]]></text>
</staticText>
<image hAlign="null" isUsingCache="false">
<reportElement key="logo" mode="Opaque" x="349" y="17" width="199" height="83" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<topPen lineWidth="0.0" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineColor="#000000"/>
</box>
<graphicElement fill="Solid"/>
<imageExpression class="java.io.InputStream"><![CDATA[$F{LOGO}]]></imageExpression>
</image>
When I switch back in the Designer-View i get the following error
Error loading the report template
Message:
net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-enumeration-valid: Value 'null' is not facet-valid with respect to enumeration '[Left, Center, Right, Justified]'. It must be a value from the enumeration.
Level:
SEVERE
Stack Trace:
org.xml.sax.SAXParseException: cvc-enumeration-valid: Value 'null' is not facet-valid with respect to enumeration '[Left, Center, Right, Justified]'. It must be a value from the enumeration.
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:73)
com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:512)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
cvc-enumeration-valid: Value 'null' is not facet-valid with respect to enumeration '[Left, Center, Right, Justified]'. It must be a value from the enumeration.
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processOneAttribute(XMLSchemaValidator.java:2799)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(XMLSchemaValidator.java:2735)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2094)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
org.apache.commons.digester.Digester.parse(Digester.java:1647)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239)
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:73)
com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:512)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
This are the Details of my Installation:
Produktversion: iReport 3.5.2
Java: 1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-b03
System: Windows XP Version 5.1 läuft auf x86; UTF-8; de_AT (ireport) )
Please help me
TOM
Austria
6 Answers:
From the Tracker link, select Report Issue. You'll get here:
http://jasperforge.org/projects/ireport/tracker/reportadvance
Thanks a lot!
Giulio
Hi,
I did face this problem sometime ago. It's a bug in ireport 3.5.0.
Solution: Open the JRXML in notepad/wordpad, Provide a value to the 'textAlignment' property (select this value for the list of values displayed) like
<textElement textAlignment="Left" rotation="None" lineSpacing="Single">
Save it and then open in 3.5. It works. Later you can change to whatever value u want.
However, v2.04 works without this fix!
Post Edited by anthonyraj at 10/08/2009 14:07