try {
con = getTransactionConnection();
if (data != null) {
designParameters.put("REPORT_CONNECTION", con);
jasperPrint = JasperFillManager.fillReport(jasperReport, designParameters,
new JRFieldProviderDataSource(data, variables.getJavaDateFormat()));
} else {
jasperPrint = JasperFillManager.fillReport(jasperReport, designParameters, con);
}
} catch (final Exception e) {
throw new ServletException(e.getMessage(), e);