Jasper report library jar download
- how to create jasper report in eclipse
- how to create jasper report in java using eclipse
- how to generate jasper report in java using eclipse
- jasper report in eclipse
Ireport download...
step : 5 Create a factory class which contain a static method whose return type is Collection that return objects of your bean class.
EmployeeImpl.java
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import bean.Employee;
public class EmployeeImpl {
public static Collection<Employee> getEmployee()
{
List<Employee>employees = new ArrayList<Employee>();
Employee e= new Employee();
e.setId(1);
e.setName("Aditya");
List<Address> addresses =new ArrayList<Address>();
Address a =new Address();
a.setCity("Ashok Nagar");
a.setCountry("India");
Address a1 =new Address();
a1.setCity("Ashok Nagar");
a1.setCountry("USA");
addresses.add(a);
addresses.add(a1);
e.setAddress(addresses);
employees.add(e);
return employees;
}