VB & Crystal Report Connection
Which is the best method for connecting SQL Server and Crystal Report directly, for eg.ODBC,ADODB,Query Analyzer.
I have two databases,say DB1 & DB2 with same structure in a single SQL Server.I have created two DSNs for each as DSN1 for DB1 and DSN2 for DB2. Now i have a report(crystal) addressing DSN1. In certain cases I require data from DSN2 to be displayed on the same report instead of DSN1. How can change the DSN Name while running the program. Here I haven't used the connection string, instead I gave the DSN name while creating the report.
If using the connection string is the easier method, please advice how to use this method in VB (even a URL to any tutorials will do).
Thank you.
Re: VB & Crystal Report Connection
Connectionstrings are easier and better for distribution/installation. no need to create a DSN on every machine.
I have almost always used an ADO connection in my reports. Then in my program I pass an ADO rs to the report as its DataSource.
This releaves CR from having to do any calculations as much as I can. CR's Selection formula can slow the report generation down
depending on the amount.
Since you are using SQL Server you could even use Stored Procedures and execute then in VB and retrieve a rs and pass that to your CR.
Probably the fastest scenerio.
I have a VB6/CR Ex. in my signature. ;)