Skip to Content
0
Former Member
Jun 14, 2011 at 03:05 PM

How to setup a recordSet for the report dinamically ?

13 Views

I'm able to load via jdb connection from java code a custom dataset for every single table of my .rpt file

for example

statement = jdbcConnection.createStatement();

javaResultSet = statement.executeQuery("Select * FROM NICHEL.dbo.destdiv" );

myRpt.getDatabaseController().addDataSource(javaResultSet);

myRpt.getDatabaseController().setDataSource(javaResultSet, "destdiv", "destdiv");

myRpt.getDatabaseController().setDataSource(javaResultSet, "destdiv2", "destdiv");

Is it correct?

Well... Now I copy the query from Crystal Report designer and paste into my code.

I load the recordset and then add to my rpt.

But How I tell to my report that this last recordset is the main source for the report !?