无法使用旧版本的iReport打开jasper报告(Unable to open jasper report with an older version of iReport)

我正在尝试打开一个Jasper报告,我使用JasperSoft studio版本6.1.0,我需要用iReport 3.7.6打开它,但是我收到一个错误:

Error loading the report template Message: net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected. Level: SEVERE Stack Trace: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected. net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:245) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected. com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131) com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384) com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:423) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3188) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1812) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:731) com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756) com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647) com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) org.apache.commons.digester.Digester.parse(Digester.java:1647) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:241) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

我试图使用JasperSoft studio编译我的.JRXML文件,但我无法使用。

有谁知道我该如何解决这个问题?

I am trying to open a Jasper Report, i made using JasperSoft studio version 6.1.0, and i need to open it with iReport 3.7.6, but i get an error:

Error loading the report template Message: net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected. Level: SEVERE Stack Trace: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected. net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:245) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://jasperreports.sourceforge.net/jasperreports":printWhenExpression, "http://jasperreports.sourceforge.net/jasperreports":break, "http://jasperreports.sourceforge.net/jasperreports":line, "http://jasperreports.sourceforge.net/jasperreports":rectangle, "http://jasperreports.sourceforge.net/jasperreports":ellipse, "http://jasperreports.sourceforge.net/jasperreports":image, "http://jasperreports.sourceforge.net/jasperreports":staticText, "http://jasperreports.sourceforge.net/jasperreports":textField, "http://jasperreports.sourceforge.net/jasperreports":subreport, "http://jasperreports.sourceforge.net/jasperreports":pieChart, "http://jasperreports.sourceforge.net/jasperreports":pie3DChart, "http://jasperreports.sourceforge.net/jasperreports":barChart, "http://jasperreports.sourceforge.net/jasperreports":bar3DChart, "http://jasperreports.sourceforge.net/jasperreports":xyBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBarChart, "http://jasperreports.sourceforge.net/jasperreports":stackedBar3DChart, "http://jasperreports.sourceforge.net/jasperreports":lineChart, "http://jasperreports.sourceforge.net/jasperreports":xyLineChart, "http://jasperreports.sourceforge.net/jasperreports":areaChart, "http://jasperreports.sourceforge.net/jasperreports":xyAreaChart, "http://jasperreports.sourceforge.net/jasperreports":scatterChart, "http://jasperreports.sourceforge.net/jasperreports":bubbleChart, "http://jasperreports.sourceforge.net/jasperreports":timeSeriesChart, "http://jasperreports.sourceforge.net/jasperreports":highLowChart, "http://jasperreports.sourceforge.net/jasperreports":candlestickChart, "http://jasperreports.sourceforge.net/jasperreports":meterChart, "http://jasperreports.sourceforge.net/jasperreports":thermometerChart, "http://jasperreports.sourceforge.net/jasperreports":multiAxisChart, "http://jasperreports.sourceforge.net/jasperreports":stackedAreaChart, "http://jasperreports.sourceforge.net/jasperreports":ganttChart, "http://jasperreports.sourceforge.net/jasperreports":elementGroup, "http://jasperreports.sourceforge.net/jasperreports":crosstab, "http://jasperreports.sourceforge.net/jasperreports":frame, "http://jasperreports.sourceforge.net/jasperreports":componentElement, "http://jasperreports.sourceforge.net/jasperreports":genericElement}' is expected. com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131) com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384) com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:423) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3188) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1812) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:731) com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756) com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647) com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) org.apache.commons.digester.Digester.parse(Digester.java:1647) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:241) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:87) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:505) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

i tried to compile my .JRXML with an older using JasperSoft studio, but i was not able.

does anyone know how can i solve this ?

最满意答案

您可以尝试使用兼容性对话框

Jaspersoft Studio:窗口 - >首选项

兼容性对话框

脚步:

设置你需要的JR版本(在你的情况下为3.7.5) 将模板另存为新文件 检查报告中的变化不是很大

You can try to use Compatibility dialog.

Jaspersoft Studio: Window -> Preferences

Compatibility dialog

Steps:

Set the version of JR you need (3.7.5 in your case) Save the template as new file Check that changes in report is not dramatically

更多推荐