|
-
Jun 11th, 2005, 11:21 AM
#1
Thread Starter
New Member
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.
Last edited by mandianie; Jun 11th, 2005 at 11:44 AM.
-
Jun 11th, 2005, 07:54 PM
#2
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|