Skip to Content
0
Former Member
Nov 26, 2009 at 01:20 PM

injecting resultset (made of joined tables query) into a report

15 Views

Hi everyone,

I come back with an unanswered question i asked a few weeks ago.

I have a crystal report file which outputs records of 3 joined tables.

Works fine when i launch it from a jsp page.

but when i wand to inject programmaticaly a resultset into it doesn't work

the below lines are working fine when pushing a single table resultset

//Get table Alias
String tableAlias = reportClientDocument.getDatabaseController().getDatabase().getTables().getTable(0).getAlias();
//Push the Java ResultSet into the report.  This will then be the datasource of the report.
reportClientDocument.getDatabaseController().setDataSource(res, tableAlias , tableAlias);

but i don't know how to make it work for 3 joined tables

I tried things like

String tableAlias = reportClientDocument.getDatabaseController().getDatabase().getTables().getTable(0).getAlias();
reportClientDocument.getDatabaseController().setDataSource(res, tableAlias , tableAlias);
String tableAlias = reportClientDocument.getDatabaseController().getDatabase().getTables().getTable(1).getAlias();
reportClientDocument.getDatabaseController().setDataSource(res, tableAlias , tableAlias);
String tableAlias = reportClientDocument.getDatabaseController().getDatabase().getTables().getTable(1).getAlias();
reportClientDocument.getDatabaseController().setDataSource(res, tableAlias , tableAlias);

but it doesn't work

would anyone help me into solving this?

Thanks