1

我正在尝试打开 Jasper Report,我使用 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 工作室来编译我的 .JRXML,但我做不到。

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

4

1 回答 1

5

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

Jaspersoft Studio:窗口 -> 首选项

兼容性对话框

脚步:

  1. 设置您需要的JR版本(在您的情况下为 3.7.5)
  2. 将模板另存为新文件
  3. 检查报告中的变化是否显着
于 2016-01-22T12:50:43.777 回答