Skip to Content
0
Former Member
Jun 24, 2010 at 06:02 PM

CommandTable report with pushed ResultSet

28 Views

I cannot get answer to my problem:

I have a few hundred reports designed with embedded sql (CommandTable). I would like to execute the query in advance and push the ResultSet into the ReportClientDocument. I tried the example for regular tables and it works, but I cannot get it to work with my embedded sql reports. I get this error: ReportSDKException: Unexpected database connector error

ResultSet rs = domyqueryhere

String tableAlias = rcd.getDatabaseController().getDatabase().getTables().getTable( 0 ).getAlias();

//rcd.getDatabaseController().setDataSource( rs, tableAlias, "" ); // also tried nothing for new name

rcd.getDatabaseController().setDataSource( rs, tableAlias, "ResultTable" );

I copied this code from Crystal example code. Like I said, it works fine for reports with acual tables, but not for a report with a CommandTable. Is there a different method to get this done? Or can I somehow add a new table with the pushed ResultSet and remove the old one?

Please, has anyone else tried this? I have searched and can't find any answers.

thx/d

Edited by: daniel d doyle on Jun 24, 2010 8:02 PM

Edited by: daniel d doyle on Jun 24, 2010 8:09 PM