Question : Crystal Reports 11 (migrating from 8.5) and VB6 using RDO resultset as datasource

I'm experiencing some Crystal Reports trouble during a migration. We have a series of CR reports that are wired to TTX text files at design time. What I would like to do is, at run time, pass the report object an RDO resultset. This was working with the older version of CR, but now that we've moved to 11.5, the data will not update.

The report is defined in a DSR (designed using the Visual Studio 6 IDE plugin), and instantiated at runtime as opposed to loaded from an RPT file, but I have tried both ways.

Here are the steps used to populate the report - this is defined in the IReport::ReportInit method:
1:
2:
3:
4:
5:
6:
'resultset is of type rdoResultset - through debugging, I've verified the resultset data is properly populated
rs = rdoDbConn.OpenResultset(someSqlStatement, rdOpenKeyset)

Me.Database.DiscardSavedData
Me.Database.SetDataSource rs

And these are the steps used to initialize and display the report:
1:
2:
3:
4:
5:
6:
7:
8:
Dim aRpt as IReport
Dim boAbort as Boolean
boAbort = False
aRpt = new rptObject()
aRpt.ReportInit boAbort
CRViewerMain.ReportSource = aRpt
CRViewerMain.ViewReport


As I mentioned, the report displays, but the data being displayed is the data from the TTX file, not the resultset

I've also tried the following during troubleshooting, with the same results:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Dim rpt as CRAXDDRT.Report
Dim app as CRAXDDRT.Application

rs = rdoDbConn.OpenResultset(someSqlStatement, rdOpenKeyset)

rpt = app.OpenReport("reportpath/report.rpt")
rpt.DiscardSavedData
rpt.Database.Datasource = rs

CRViewerMain.ReportSource =  rpt
CRViewerMain.ViewReport


Am I missing something?

Answer : Crystal Reports 11 (migrating from 8.5) and VB6 using RDO resultset as datasource

I've located the following PDF which has a resolution for this situation:

http://resources.businessobjects.com/support/communitycs/TechnicalPapers/ado_rdcsubrep.pdf

Hopefully that helps anybody else looking for an answer to this.
Random Solutions  
 
programming4us programming4us