How to loop through a List available as a parameter?

I am trying to pass java.util.List as one of the parameter to master report.

List myList = new ArrayList();
myList.add("one");
myList.add("two");
myList.add("three");
Map parameters = new HashMap();
parameters.put("MY_LIST", myList);

<parameter name="MY_LIST" isForPrompting="false" class="java.util.List"/>

I have read that we can use JRBeanCollectionDataSource to loop but I am not sure in my case if it works because my subreport will need a connection object to query oracle database.

The value that I get from this List will be one of the parameters sent to the subreport and also printed in the detail band of master report.

I have no idea on how I can use this list to loop in the detail band. Any suggestions please?

mathewrond's picture
Joined: Aug 21 2006 - 5:56pm
Last seen: 17 years 1 month ago

0 Answers:

No answers yet
Feedback
randomness