on 06-24-2015 9:25 PM
I'm trying to add data elements to my report based on my java objects (POJO). I cannot seem to get the Java Beans Classes drop down menu to populate despite following the CRConfig.XML tutorial I found on the SAP site.
Has anyone ran into this issue?
Resolved...
I should have read the Java Beans Connectivity pdf more carefully. Crystal Reports Designer expects to see a method return a ResultSet.
It does not work like CR4E where you can simply right click the class and add a POJO to a new report.
Using the com.businessobjects.samples.pojo.* pojo api provided by SAP this worked..
public class MonsterService {
public ResultSet getAllMonsters() {
List<Monster> monsters = new ArrayList<Monster>();
monsters.add(new Monster("Bill", 3l, true));
monsters.add(new Monster("Ralph", 5l, false));
monsters.add(new Monster("Cory", null, true));
monsters.add(new Monster("Stan", 3l, false));
monsters.add(new Monster("Steve", 5l, false));
POJOResultSet resultSet = getResultSet(monsters);
return resultSet;
}
private POJOResultSet getResultSet(List<Monster> monsters)
throws POJOException {
POJOResultSetFactory factory = new POJOResultSetFactory(
Monster.class);
POJOResultSet resultSet = factory.createResultSet(monsters);
return resultSet;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To add.. I've also exported my class into a JAR file and added the absolute path directly to this .jar... As the documentation describes.. It does not work for me. The drop down remains blank.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.