While evaluating Crystal XI (attempting to upgrade from 8.5), I've run into this problem:
In a VB6 thick-client environment, I have a dynamically-built ADO recordset object that does NOT employ an ADO Connection or ADO Command object.
What I want to do is create a new (blank) report at runtime and add this ADO recordset object to the report's databasetables collection.
The reason I want to do this is because the XI documentation claims that the p2smon.dll (active data) data driver has been deprecated, along with the CreateFieldDefFile() and CreateReportOnRuntimeDS() functions, which worked fairly well in previous versions of our application.
So I'm basically looking for a new way to create a new report and add a recordset (or multiple recordsets!) to it at runtime. I thought the Add method of the DatabaseTables collection would do the trick, but I can't get it to work and documentation is sparse. Here's some VB6 code:
The above causes error "-2147189139 Invalid Argument provided."
I've tried other permutations of the above code, including specifying database dll's, with no luck. Any suggestions?
Thanks,
Trent
In a VB6 thick-client environment, I have a dynamically-built ADO recordset object that does NOT employ an ADO Connection or ADO Command object.
What I want to do is create a new (blank) report at runtime and add this ADO recordset object to the report's databasetables collection.
The reason I want to do this is because the XI documentation claims that the p2smon.dll (active data) data driver has been deprecated, along with the CreateFieldDefFile() and CreateReportOnRuntimeDS() functions, which worked fairly well in previous versions of our application.
So I'm basically looking for a new way to create a new report and add a recordset (or multiple recordsets!) to it at runtime. I thought the Add method of the DatabaseTables collection would do the trick, but I can't get it to work and documentation is sparse. Here's some VB6 code:
Code:
Dim adoTemp As ADODB.Recordset
Dim crxApp As CRAXDDRT.Application
Dim crxRpt As CRAXDDRT.Report
' adoTemp has been already filled with data at this point.
Set crxApp = New CRAXDDRT.Application
Set crxRpt = crxApp.NewReport
crxRpt.Database.Tables.Add "", , adoTemp
I've tried other permutations of the above code, including specifying database dll's, with no luck. Any suggestions?
Thanks,
Trent