How to use Collection datasource from Java application?

1.Create a parameter in the main report .
2.Make sure to change the data type of the parameter as new JRBeanCollectionDataSource
3.To link the Bean to the subreport follow
4.From the java application use the following code
  
List list = new ArrayList
list.add(“itemlist to be added”)
Parametername.put(“collectiondatsourceparameter” new JRBeanCollectionDataSource(list)

Make sure to pass this datsource parameter to the subreport.

No comments:

Post a Comment

Page copy protected against web site content infringement by Copyscape