Designing the POJO class

When designing a class to use as a POJO, you can use a Java Project, a J2EE Utility Project, or a Crystal Reports Web Project.

Your POJO class must have a schema that is compatible with a table in your report. The names and types are case insensitive, but they must match.

Note:    The SDK supports only non-static public “get” and “is” methods with no input parameters and non-static public fields. If a method and field use the same name, the method has higher priority.

The following data types are supported:

At runtime, the POJO class must be in your classpath. For example, for a Crystal Reports Web Project, the POJO class must be in WEB-INF\lib.

An example of a POJO class named ReportData is shown in the next section.

ReportData.java sample code

import java.sql.*;

public class ReportData

{

public String firstName;

private String lastName;

private int age;

private Date birthDay;

public ReportData(String firstName, String lastName, int age, Date birthDay)

{

this.firstName = firstName;

this.lastName = lastName;

this.age = age;

this.birthDay = birthDay;

}

public String getLastName()

{

return lastName;

}

public int getAge() {return age;}

public Date getBirthDay() {return birthDay;}

}






Business Objects
http://www.businessobjects.com/
Support services
http://www.businessobjects.com/services/support/