Jump to content
Changes to the Jaspersoft community edition download ×


  • Posts

  • Joined

  • Last visited

christoph.buehler's Achievements

  1. I solved this issue: http://stackoverflow.com/questions/25153865/xml-datasource-in-report-is-not-working
  2. I want to compile a .JRXML file with an XML Datasource in Java. It works perfectly within iReport. In Java, it does not work. When I set the main query language to 'xpath', the report is generated, but with no xml data in it. With 'xpath2' as the main query language, I get an error "No query executer factory registered for the 'xpath2' language" and the report is not being generated. It doesn't even work with the simplest report you can think of. What I've tried so far: Checked for the following line in jasperreports.properties: net.sf.jasperreports.query.executer.factory.xpath2=com.jaspersoft.jrx.query.JRXPathQueryExecuterFactoryChecked for the .jar file "jasperreports-extensions-3.5.3.jar" in my applications classpathAdded this line to my Java code: jasperReport.setProperty("net.sf.jasperreports.query.executer.factory.xpath2", "com.jaspersoft.jrx.query.JRXPathQueryExecuterFactory");Set the XML Datasource in Java: org.w3c.dom.Document document = JRXmlUtils.parse(JRLoader.getLocationInputStream(args[2])); params.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, document);My report generation code: JasperReport jasperReport = JasperCompileManager.compileReport(args[0]); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, params, new JREmptyDataSource()); JasperExportManager.exportReportToPdfFile(jasperPrint, args[1]); I appreciate your help.
  • Create New...