No idea why you are getting duplicate records but for starters comment out all the code that deals with the ADO recordset. The report will connect to Oracle on its own. Does setting the Datasource to a Recordset over-ride the retrieving data directly from Oracle? Or will Crystal link both?
The reason I've got the ADO in the code is because I want to develope the report so that the user can select different Card Numbers (CRAD_NUM) and then run the report, rather than having it as static.
Usually its one or the other. IE the report does all (or most of the work) by connecting to the database or your VB code connects and passes the data source to the report.
Create a Parameter in your report. You can then prompt for and pass the parameter value from VB to the report.
BTW, I would rather use SPROC rather than using a dynamic recordset populating the report. Once you access your report in your VB program, it CR automatically prompts for the parameter that the end user needs to type in.
I guess if the report is a simple one it is OK. However, I later found out that this was totally challenging and inflexible when the report gets more complex especially when you have sub-reports. So basically, I droped this method (ADO - dynamic rs) of populating my CR report.
Or as Bruce pointed out, instead of a SPROC, create a parameter in your report inside CR instead.
Last edited by ARPRINCE; Jun 3rd, 2004 at 06:18 PM.