I'm trying to figure out how to pass a Record Set from VB directly into Crystal Reports. Is their a simple way to just pass the record set into the program?
Printable View
I'm trying to figure out how to pass a Record Set from VB directly into Crystal Reports. Is their a simple way to just pass the record set into the program?
It depends on your definition of easy.
What you have to do is create the report using with a database that contains the structure of your recordset. To do this when you add a database to the report select more data sources\active data\active data (field definitions only). This wil bring up another dialog. Select new, the next screen you get will be where you set up the structure of the recordset. Keep in mind that order does matter. If you set all of this up right to call the report use the following code
With CrystalReport1 ' your crystal report object
.ReportFileName = strPath ' full path to the report
.SetTablePrivateData 0, 3, rsdata2
.WindowState = crptMaximized
.Action = 1
End With
In this exampel rsdata2 is the recordset you are sending to the report
Again, as Julian Toft said, it depends on your definition.
But, check my post in this thread for an alternative method I use http://209.120.143.185/showthread.ph...hreadid=152633