开发者

Jasper reporting iterate through a list

I have list of strings that to be passed to the JR report using a HashMap. I want to know how to iterate through that list in the jrxml file and print the contents of the list. 开发者_开发问答

I use iReport as the GUI designer.


Why are you passing the list as a HashMap instead of an actual List? If all you want to do is include a list of values in the report and it's all Strings, you could just build a comma-delimited list and pass it to the jrxml file as 1 String object.

If you have a list of data that needs to be associated with each individual data object, you can create a subreport that takes an ArrayList datasource with your list of things to print, and then include it in the main report.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜