small tutorial.. on Jasper Report JavaBeans DataSoruce
JRFactoryClass.java with Static method
import java.util.ArrayList;
import sdInterface.JRDataSource;
public class JRFactoryClass {
public static ArrayList
ArrayList
// Java bean populated with row data by iBATIS
Employee msb = new Employee ();
msb.setAgentId("2378");
msb.setFirstName("Test");
msb.setLastName("Sample");
msb.setGender("Male");
list.add (msb);
Employee msb1 = new Employee ();
msb1.setAgentId("2373");
msb1.setFirstName("Tested");
msb1.setLastName("Sample0");
msb1.setGender("Female");
list.add (msb1);
return list;
}
}
create a JavaBeans set DataSource in Ireport to map the object with fieldName and static method.
Done.
No comments:
Post a Comment