Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2004-08-06
10
317 Views
Last Modified: 2008-03-17
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.
0
Comment
Question by:gregasm
  • 5
  • 3
10 Comments
 
LVL 8

Author Comment

by:gregasm
ID: 11738974
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...
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 11739008
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.

mlmcc
0
 
LVL 8

Author Comment

by:gregasm
ID: 11739341
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?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

 
LVL 8

Author Comment

by:gregasm
ID: 11739985
nevermind. its fixed... using the app.config file concept of pointing to the correct assembly version...
0
 
LVL 8

Author Comment

by:gregasm
ID: 11741168
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!!!!!!
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 11743608
I don't use .Net so I am not at all familiar with the config files.

Thanks for acknowledging my help

mlmcc
0
 
LVL 8

Author Comment

by:gregasm
ID: 11743683
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.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 11744259
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
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question