cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with setting a ResultSet at runtime

Former Member
0 Kudos

Hi,

I am having problems setting my report data using a ResultSet. I am creating my report using CRXI R2, with a FieldDefinition data source. There are two tables in the report which are joined.

The problem is that when I set the ResultSets at runtime, one of my tables appears to populated, and the other does not, leaving me with a mostly blank report (I am exporting to PDF). There are no errors from the Java engine.

I have experimented creating simple, blank reports from scratch, and I cannot get more than one table to display data in any case. Am I doing something wrong? Is there something else I need to do too? Below is the code where I loop through the tables in my report and set the data:

Tables tables = reportClientDoc.getDatabaseController().getDatabase().getTables();
        Iterator iter = tables.iterator();
        while(iter.hasNext()){
        	Table table  = (Table) iter.next();
        	System.out.println("..." + table.getAlias());
        	ResultSet rs = resultSets.get(table.getAlias());
        	if(rs != null){
        		reportClientDoc.getDatabaseController().setDataSource(rs, table.getAlias(), table.getAlias());
        		System.out.println("    Set data for "+table.getAlias());
        	}
        }

Many thanks,

James

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Ted, but I was already using the latest version of the JRC (11.8.0_11.8.5.v1197).

Many thanks,

James

ted_ueda
Employee
Employee
0 Kudos

If you enable DEBUG Log4J tracing, what do you see?

It should give you the internal workflow being used to set the data source and enforcing links.

By the way, what type of links are they?

Sincerely,

Ted Ueda

Former Member
0 Kudos

Incidentally, I have managed to temporarily solve this by removing table links within Crystal. While this is not satisfactory, it means that both tables now display data. Given this fact, can anyone determine what the problem was?

ted_ueda
Employee
Employee
0 Kudos

There's been some fixes involving table links, so I'd first recommend trying a newer version of the Java Reporting Component engine.

Version 11.8.5 (CR4E version 1 Patch 5) JRC library files may be found here:

[https://boc.sdn.sap.com/node/19020]

Keycode for XI will work with that version (i.e., free upgrade).

If you download and install the Eclipse IDE integration, you can upgrade to Patch 6.

Sincerely,

Ted Ueda