Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with setting a ResultSet at runtime

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

Not what you were looking for? View more on this topic or Ask a question