Solved

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

Posted on 2004-08-06
10
313 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now