on 06-26-2015 4:14 PM
CR support suggested I crosspost from SAP Crystal Reports in hopes I get better feedback..
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.
Additionally, I also tried right clicking my request.java file > export > jar and added the request.jar file to my <JavaBeansClassPath>.. Did not work.
I see this int he drop down menu JavaServerType=JavaBeans JavaBeanName= but I receive "unknown database connector error error details: [database vendor code: 7171939]"
My java class implements serializable and contains a builder pattern
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.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.