[英]JasperReports accessing method on bean datasource?
I'm using JasperReports and I'm using the provided JRBeanCollectionDataSource
class to wrap a List
of beans. 我正在使用JasperReports,并且正在使用提供的
JRBeanCollectionDataSource
类包装bean List
。 Everything works fine in my reports when I'm accessing a simple property of the bean, but what I really need to do is access a few methods on the class. 当我访问bean的简单属性时,报表中的所有内容都可以正常工作,但是我真正需要做的是访问类中的一些方法。 For example I would like to access the method:
例如,我想访问该方法:
public List<Date> getCertifications(Date postedBy);
How would I go about accessing this in the JRXML (or iReport )? 我将如何在JRXML (或iReport )中访问它? If I define a field such as
如果我定义一个字段,例如
<field name="certifications" class="java.util.List"/>
then I get an error that the property is unknown. 然后我得到一个错误,该属性是未知的。
Thanks for the help! 谢谢您的帮助!
JasperReports: version 3.7.3
JasperReports:版本3.7.3
What date will you pass? 您将经过什么日期? I think, with JRXML you can only define bean properties - ie the ones that have a standard setter and getter.
我认为,使用JRXML只能定义bean属性-即具有标准setter和getter的属性。 Everything else you can invoke from expressions.
您可以从表达式调用的所有其他内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.