My POJO Datasource basically contains the following structure.
// Company .java
public class Company implements Serializable { private static final long serialVersionUID = 3130918429913376956L; private String name; private String address; private String contactPerson; private String mobile; private String fax; private String bankDetails; private String email; private List<Employee> emps;
// Employee.java
public class Employee implements Serializable{ private static final long serialVersionUID = -4473328670062370497L; private String name; private int age; private String designation;
My script is like the following
- A single PDF report may be larger than one company (i.e. List <Company))
- In the case of more than one Company, it should begin on a new page.
- If the Employee list goes to the next page, then it should repeat the title on the next page.
Layout -
Xml source layout
Exit Page 1

Page 2

There are two problems with this design.
Employee Name header is repeated for each employee.- The company title (
Comp Name -> Company A ) should be displayed only once.
Can someone suggest me the right approach? Thanks in advance.
source share