I have found multiple posts where people have experienced the following but yet to find a practical solution.
You develop a report using oledb connection and specify a server/database to connect to and develop your report using a couple tables, just a typical report. Now I wish to deploy this report in a .Net application and utilize ReportDcoument.Load to load the report, change the connection information to the specific server/database I wish to connect to (at runtime, which is a completely different server/database than what was used at design time), and then view the report in the report viewer...and it all works!....unfortunately the user has to wait for upwards of 2-4 minutes just for ReportDocument.Load to actually finish as it appears to try and connect the server/database specified at design time, and of course it cannot find it since it was a development server/database that does not exist anywhere on my users network. So what to do?
If we change the server/database in the report through the designer first (where you also have to wait for it to attempt to find the server/database as well) to match one that actually exists, and then try it, then ReportDocument.Load runs in a second or two. But this is not a practical solution as it turns out my application is deployed to many clients and changing every report for every client, even through some sort of utility sounds like insanity to me (we have 200 or so clients and around 400 crystal reports!). There must be a more elegant solution where we can some how prevent the Load method from attempting to find the server/database stored in the report, or at least adjust the time out before it decides it cannot find it, so that we can then set the appropriate server/database before any attempt is made to connect to it. The only solution I have found thus far is to manually modify your report to have it reference a server/database that actually exists, and that is not acceptable for any application that is deployed to many clients. Maybe there is a way to change the server/database at runtime without doing a ReportDocument.Load first but I have not found anything. Has anyone run into this and found a decent solution/workaround?