Skip to Content
0
Former Member
Feb 25, 2011 at 04:57 PM

Programmically switching databases

28 Views

Hi Everyone,

We've had a series of troubles using Crystal Reports .NET, I figured I may as well detail them here and see if someone smarter than I can help.

Situation:

We have three databases that are structurally identical, one for Test, one for Pre-Production and one for Production. Now we added a script in the report viewer that uses a connection file that exists in each project folder to determine what Database the reports need to connect to.

This allows us to make one version of the reports and not have to change the database Connection everytime we need to promote to a different database.

Now, alot of the time it works pretty good, but some of the reports will consistently throw errors when their database location is not set correctly for the database that the script is trying to get them to connect to.

So, question: is there a way to make this work OR is there a better way to have dynamic database connections to circumvent this problem entirely?

Thanks in advance,

John.