cancel
Showing results for 
Search instead for 
Did you mean: 

Java Beans Connectivity > Java Beans Classes Drop Down Menu is BLANK!

Former Member
0 Kudos

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.

http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/90f892e8-931e-2b10-81a8-9154b9ee7...

  1. I pointed my <JavaDir64> to my sdk/bin
    <JavaDir64>C:\Program Files\Java\jdk1.8.0_31\bin</JavaDir64>
  2. <JavaDir32></JavaDir32>
  3. Added my <JavaBeansClassPath>
    <JavaBeansClassPath>C:\Users\<username>\git\<app>\target\classes\com\company\project\domain</JavaBeansClassPath>

    This folder contains my compiled java classes ie. person.java > person.class
  4. Opened CR 2013 (trial version) expecting to see the java beans classes populated but it's still blank.

Has anyone ran into this issue?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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;

  }

}

Answers (1)

Answers (1)

Former Member
0 Kudos

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.