Displaying an ArrayList attribute of a Bean in Main Report

Dear Sirs,

I have a Main jasper report displaying info of Employees.
This report DataSource is Array List of Employee Bean:

JRBeanCollectionDataSource beanDataSource = new JRBeanCollectionDataSource(oArrayListEmployeeBean);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters,  beanDataSource);

Now there is requirement to display List of Devices for each Employee,
for which I have created ArrayList as attribute of the Employee Bean.

How can I display this additional info as Table in the existing Main report. Please help.

class EmployeeBean{
    // ...
    // bean definition
    // ...
public ArrayList<EmployeeDevice> employeeDevicesList;

class EmployeeDevice{
    private string employeeID;
    private string deviceType;
    private string deviceSerial;
    // ...
    // bean definition
    // ...


aatifnaeem1's picture
Joined: Jan 21 2018 - 3:53am
Last seen: 5 years 2 months ago

0 Answers:

No answers yet