Link to home
Start Free TrialLog in
Avatar of gregasm
gregasm

asked on

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?

Thanks.
Avatar of gregasm
gregasm

ASKER

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...
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gregasm

ASKER

mlmcc,

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?
Avatar of gregasm

ASKER

nevermind. its fixed... using the app.config file concept of pointing to the correct assembly version...
Avatar of gregasm

ASKER

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

mlmcc
Avatar of gregasm

ASKER

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

mlmcc