I need to develop a report in JasperReports which contains ONE sub-report but the sub-report is repeated for every value in the list parameter.for example :
Parameter List to be passed to ONE subreport : 1,2,3,4
MyReport :
- Subreport(Crosstable+ page break) for value 1 of the passed parameter
- Subreport(Crosstable+ page break) for value 2 of the passed parameter
- Subreport(Crosstable+ page break) for value 3 of the passed parameter
- Subreport(Crosstable+ page break) for value 4 of the passed parameter**
Then the Subreport will also contain another "sub-Subreport" that should be repated X time for each value, example : Subreport(Crosstable+ page break) for value 1 of the passed parameter :
- "sub-subreport"(another Crosstable) for value 1.1
- "sub-subreport"(another Crosstable) for value 1.2
- "sub-subreport"(another Crosstable) for value 1.3
In other words i'm trying to loop on the same subreport but with different data something like :
for(i=0; i<list.lenght();i++){
print(subreport(i));
}
I don't to know how it can be done. I hope my examples are clear. Thanks in advance