Jackeline161 Posted July 12, 2013 Share Posted July 12, 2013 Hello everybody I have a problem with passing a list as a datasource for my report, the list has a type not primitif (g_listCla = new ArrayList<Cla>() )so I ask if it's possible to do it because it doesn't work for me :s There is the method that i use : public String ToPdfFormat() throws ColumnBuilderException, ClassNotFoundException { try { System.out.println("g_titre :"+titreEtat);System.out.println("g_listCla:"+g_listCla.size());FastReportBuilder drb = new FastReportBuilder();DynamicReport dr = drb.setTitle(titreEtat).setSubtitle("This report was generated at " + new Date()).setPrintBackgroundOnOddRows(true).setUseFullPageWidth(true).build(); // build JasperPrint instance, filling the report with data from datasource created above JasperPrint jasperPrint = DynamicJasperHelper.generateJasperPrint( dr,new ClassicLayoutManager(),g_listCla); // export to pdf JasperExportManager.exportReportToPdfFile(jasperPrint, "C:\MyReport1.pdf");} The list is already filled in the other method when my dynamic query is generated so i wish to pass the list directly to my report , please help me !!!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now