开发者

How do I display HashMap and List property in Jasper

Hello All I have a POJO class which have some property out of them two are of type

List someName; TreeMap> my开发者_如何学编程Map;

here I am getting this data from the above property and I would Like to show them on jasper report. I want to know what to write on jrxml file, I am using jasper version 1.0.2 Thanks in advance.


I don't believe you can easily display the values on a list or map using JasperReports directly from a POJO.

I believe you would have to wrap the POJO in a bean data source. See also:

  • http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/data/JRAbstractBeanDataSource.html
  • http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/data/JRBeanCollectionDataSource.html

Then, you "connect" to the bean data source and return the results as required.

This probably requires JasperReports version 3.0 or greater.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜