JasperPrint jasperPrint = new JasperPrint();
private JasperPrint runAndRender(Report report) throws Exception, JRException { JasperPrint jasperPrint = new JasperPrint(); JasperReport jasperReport = JasperCompileManager.compileReport( System.getProperty("opennms.home") + File.separator + "etc" + File.separator + "report-templates" + File.separator + report.getReportTemplate() ); if(report.getReportEngine().equals("jdbc")){ Connection connection = DataSourceFactory.getInstance().getConnection(); jasperPrint = JasperFillManager.fillReport(jasperReport, paramListToMap(report.getParameters()), connection ); connection.close(); } else if(report.getReportEngine().equals("opennms")){ LOG.error("Sorry the OpenNMS Data source engine is not yet available"); jasperPrint = null; } else{ LOG.error("Unknown report engine: {} ", report.getReportEngine()); jasperPrint = null; } return jasperPrint; }
whenResourceMissingType = jasperReport.getWhenResourceMissingType(); jasperPrint = new JasperPrint();
jasperPrint = new JasperPrint();