sazoo25 Posted November 20, 2006 Share Posted November 20, 2006 I have this program, which I will be using arraylist as the datasource. The problem is how do I access the arraylist in ireport? here's part of the code: ArrayList results = (ArrayList)session.getAttribute("pdf");JasperPrint jasperPrint = JasperManager.fillReport(jasperReport,parameters,new JRBeanCollectionDataSource(results)); thanks Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted November 21, 2006 Share Posted November 21, 2006 If arraylist is an array of properly formatted beans, then you just refer to each field in the bean as a field in the report.i.e. public class Test { private String myTestString; public void setMyTestString(String s) {myTestString = s;} public String getMyTestString() {return myTestString;}} The field in this instance would be $F{myTestString}. HTH,Robin 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