Dynamic List in JasperReports 3.6 with JavaBean Data Source

I am using iReport 3.6.

I have a JavaBean class that has the following code:

private Collection<String> containerNumber; public Collection<String> getContainerNumber() { return containerNumber; } public void setContainerNumber(Collection<String> pContainerNumber) { this.containerNumber = pContainerNumber; } 

When I let iReport 3.6 read this JavaBean, it sees the collection (which is exactly what I want). But I want to show this collection in my report as a dynamic list / field. Therefore, when setContainNumber sets 1 container number, 1 container is displayed in the report. When setContainerNumber sets 10 containers, the report shows 10 containers. Under my containers in my report, I have more fields, when 10 containers are shown, these fields should fall by 10 containers. When it shows 1 container, these fields should fall on 1 container.

My question is: How do I show a dynamic list using a string collection as a JavaBean data source?

+6
source share

All Articles