public static JasperReport getReport(String reportName) {
JasperReport jasperReport = null;
/* ClassLoader previousLoader = null;
Thread t = Thread.currentThread();*/
try {
ReportTemplate template = new ReportDAO().loadByName(reportName);
if (template == null)
throw new Exception("Report template does not exist for name: ".concat(reportName));
ProcessToolContext ctx = ProcessToolContext.Util.getThreadProcessToolContext();
ByteArrayInputStream contentInputStream = new ByteArrayInputStream(Base64.decodeBase64(
(new String(template.getContent())).getBytes("UTF-8")));