I'm having the following problem: I have a report with sub report, where and passed as one parameter Collection. when I run into the iReports the resulado comes as planned, but when I run in my Java code, the following error appears:
Caused by: java.lang.ClassCastException: [Ljava.lang.String; can not be cast to java.util.Collection
the library version 5.5.1 and and my code that generates the PDF is:
InputStream is = this.getClass () getClassLoader () getResourceAsStream ("/" + filename)..;
JasperDesign jd = JRXmlLoader.load (s);
JasperReport jr = JasperCompileManager.compileReport (jd);
JasperPrint jp = JasperFillManager.fillReport (jr, parameters, jdbcTemplate.getDataSource () getConnection ().);
byte [] = pdfBytes JasperExportManager.exportReportToPdf (jp);
return pdfBytes;