Jasper reports 如何将对象列表传递给子报表,并直接将该对象用作JasperReport中的字段?

Jasper reports 如何将对象列表传递给子报表,并直接将该对象用作JasperReport中的字段?,jasper-reports,Jasper Reports,在主报表上,我有一个参数ArrayList($p{customers}),我想将该列表传递给子报表。目前,我使用以下数据源表达式: new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($p{customers}) 但是在子报表上,我想直接使用该列表的Customer对象作为字段,因此我只有一个字段 $F{customer}(字段类:customer) 我怎样才能做到这一点

在主报表上,我有一个参数
ArrayList
$p{customers}
),我想将该列表传递给子报表。目前,我使用以下数据源表达式:

new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($p{customers})

但是在子报表上,我想直接使用该列表的
Customer
对象作为字段,因此我只有一个字段
$F{customer}
(字段类:
customer

我怎样才能做到这一点