URGENT!!! Crystal Reports .NET Database Login Dialog Box appears

Hi Experts,

I wrote an application that uses the Crystal Reports for .NET included with VS IDE for reporting off SQL Server 2000. Everything works fine, except when I have two versions of my application running on the same machine.

One version uses .NET framework 1.0 and that version of CR that came with VS 2002.

Another version uses .NET framework 1.1 and that version of CR that came with VS 2003.

Whichever version is installed last will work fine when I bring up a crystal report, but then the other version will have a Database login dialogbox appear when I bring up the crystal report. So, assume version 1 is loaded then version 2 of my app, version 2 will run fine. Then I run the installer for version 1 again, and now version 1 can see the crystal reports, but now version 2 of my app will bring up the Database login dialog box when I run a report from it.

Has anyone seen this before, and know of anyway to get both version running happily in tandem, on the same machine?

Who is Participating?

Improve company productivity with a Business Account.Sign Up

mlmccConnect With a Mentor Commented:
Until Crystal 9 you couldn't have 2 versions of Crystal installed on the same machine.  CR.Net is based on CR9 and that may be the problem.  The install doesn't really see them as different versions  I believe the problem comes in the common files or dlls which are installed in Windows/system.

gregasmAuthor Commented:
It may be important to note that when I do get the Database Login dialog box, it seems that there is no combination of entries I can use that are correct, even knowing all the database login credentials.

In the GAC on the deployment machine, there are two version of all the crystal reports assemblies. there are versions 9.1.500 and 9.1.3300.

I am thinking that during deployment, I am referencing one of those somewhere in my libraries, and that is why that version of my application works. Now if I were to make a specific reference to the right crystal reports dlls in my app.config file, would that help the two version co-exist peacefully on the same machine?

Any other help / suggestions would be very appreciated...
gregasmAuthor Commented:

You are right because in the program files directory, there is a directory called "common". Under common, there is a crystal reports directory that has two sub dirs: 1.0 and 1.1

If version 1 of my program is the one that is currently working (that version uses framework 1.0), then I can make the version 2 of my program work by RENAMING the directories under common. I rename 1.0 to 1.0 test and then I rename 1.1 to 1.0

This effectively switches it around so that version 2 of my program works, and now version 1 gets the database login dialog box.

It would seem that the solution to this problem will come through the app.config file and using side by side versioning... Do you know of a way to get both versions of my program to reference the correct crystal reports common assemblies?
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

gregasmAuthor Commented:
nevermind. its fixed... using the app.config file concept of pointing to the correct assembly version...
gregasmAuthor Commented:
Thanks for your response, mlmcc. Your insight was helpful.

This problem did boil down to "dll hell", but in .NET this can be resolved by directing the runtime to the correct assembly version through runtime a configuration file.

It turns out that the CR assemblie v. 9.1.5000.0 was not backwards compatible with framework 1.0. So when I deployed my version of the application that was developed to run on framework 1.1, I used the configuration file to use CR assembly v. 9.1.3300.0. Thankfully, framework 1.1 is backwards compatible enough to still work with that version of the CR assemblies.

This is how I could run both version of my app at the same time. (and without creating a new build).

I felt a B grade along with 500pts was a fair exchange for your insight. If you mentioned the config file, I would have given the A grade because then you would have solved the entire problem for me, straight up.

Thanks, mlmcc!!!!!!
I don't use .Net so I am not at all familiar with the config files.

Thanks for acknowledging my help

gregasmAuthor Commented:
You know what, I am an idiot.

I shouldn't expect that you know about .NET config files. After all this is the Crystal Reports channel. I will try to have the grade changed.
I had no problem with the grade and was grateful for the explanation of it.  You are one of the first to give less than an A and give an explanation.  The explanation was reasonable and the grade appropriate.  

Thanks for the increase

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.