Jump to content

iterate through arryalist in jrxml


Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Yes, you can use a subreport for that.

You'll have to create a subreport, and give a subreport expression to the subreport element in your main report like :

new JRBeanCollectionDataSource($P{dataSource})  (with dataSource of type Collection, List, Arraylist...)

Your subreport will have a REPORT_DATA_SOURCE, and will iterate on the fields you tell him to. Like lucian said, map a field with _THIS (I didn't know that, very interesting ! :)), and use it in the detail band...




Link to comment
Share on other sites

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...