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.getDataSource().getConnection();
      jasperPrint =
          JasperFillManager.fillReport(
              jasperReport, paramListToMap(report.getParameterCollection()), connection);
      connection.close();
    } else if (report.getReportEngine().equals("opennms")) {
      LogUtils.errorf(this, "Sorry the OpenNMS Data source engine is not yet available");
      jasperPrint = null;
    } else {
      LogUtils.errorf(this, "Unknown report engine: %s ", report.getReportEngine());
      jasperPrint = null;
    }

    return jasperPrint;
  }