Jump to content
We've recently updated our Privacy Statement, available here ×

Jasper Library no compile with Parameter


julioces

Recommended Posts

hello,

 

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[/code]
 

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;[/code]
 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...