Hi,
we have some reports which contains tables (SQL Server) connected to different databases and also to SQL Server temporary tables (cf. ##).
Actually our Print-BusinessLogic (VB.Net 2010 SP6) steps through the main report and through the subreports, and replaces the ConnectionInfo and other Props like the QualifiedName...
using:
reportClientDoc.DatabaseController.SetTableLocationEx(checkTable, modifTable)
I found the following statement here: SetTableLocation Method
It is recommended that you use the ReplaceConnection method, which is designed for enhanced performance.
Use the SetTableLocation method to change the location of a database table that is active in a report. This is especially useful if a report uses a database that has a different location on your system.
As Ludek stated out: (When to use the 'Replace Connection' method using the Crystal Reports or InProc RAS SDK for .NET)
When not to use replace connection? Any time you need to do any table level modifications.
For a report with 3 subreports (each with 10 tables), the whole procedure takes nearly 2 seconds.
Can I use DatabaseController.ReplaceConnection() instead? I think not.
Any opinions?
Patrick