VB.NET Crystal Reports Declaration Causing App to Crash

I am attempting to develop an app to run on my server (Win Server 2008) but this one statement is causing it to crash straight out of the gate:

Dim crReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument

I am using the following .NET reference in my VB.Net app:
CrystalDecisions.CrystalReports.Engine, v10.2.3600.0,copylocal=false

I have tried to register the CrystalDecisions.CrystalReports.Engine.dll but REGSVR32 reports that the "module was loaded but the entry-point DllRegisterServer was not found."

Boy, I really hope someone can help me out with this problem.
trbbhmAsked:
Who is Participating?
 
trbbhmConnect With a Mentor Author Commented:
Well, I was finally able to reference the 4.0 framework objects in my code - and the app still crashed right out of the gate.  So I got to fooling with the Crystal Report Viewer control that I had on my main form.  I was basically stripping the control down to show only the report - no header, no footer - just the report.  Well, I found out that one very specific property was causing it to crash - the "ShowCopy" property, when set to "False" would cause the app to crash.  It seems very strange that this one property would do it, but I switched each one off, rebuilt the app, and executed it on the server, and this is the only one that makes it crash.

I set this property to "True" and it runs just fine.  Go figure.
0
 
vastoCommented:
I guess the dll is not in GAC. Try to change copylocal=true
0
 
trbbhmAuthor Commented:
Not trying to be challenging, but what would "copylocal=true" gain me if the DLL won't register?  Currently the DLL *is* copied to the same directory on the server as the executable.  But the DLL will not register on the server.
0
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.

 
vastoCommented:
This is not a COM dll. That is why you cannot register it.

.NET assemblies should be either placed in GAC or in the same folder as the application. "Copy Local= true" will copy the dll to the bin folder before to compile the application.
0
 
trbbhmAuthor Commented:
I changed "copy local=true", re-built the app, copied the new exe to the app folder on the server, and no change.
0
 
vastoCommented:
Do you have Crystal reports installed on the server ?
0
 
CodeCruiserCommented:
You need to install the correct version of crystal reports runtime on the server.

http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp
0
 
vastoCommented:
The crystal reports version will depend by your Visual Studio version. The link from CodeCruiser is for VS2010. What is you VS version ? If it is VS2010 then you need to use Crystal Reports for VS2010 on your development machine and the server.  The curent version of Crystal Reports used by you is 10 , Crystal Reports for VS2010 is version 13. If you are using VS2008 then you need to create a setup and to install your project on the server .
0
 
Éric MoreauSenior .Net ConsultantCommented:
have you properly installed CR on the server?
0
 
mlmccCommented:
CR10.2 is VS2005

This tutorial should explain how to install and what to install for applications written in VS2005 with CR 10.2

http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

mlmcc
0
 
trbbhmAuthor Commented:
Currently using VB.Net 2005.  CR is *not* installed on the server, but the CR runtime files for .NET Framework 4.0 *are* installed on the server.

CR XI is installed on development laptop.  CR runtime files for .NET Framework 4.0 are also installed on the development laptop.

I've attached a screenshot of the .NET reference that I'm attempting to use.

I realize that this is a driver conflict somewhere and I'm needing to reference the same DLLs on both machines (development laptop and production server).  I'm just not sure while one is the correct one.

I guess I could uninstall CR XI on the development laptop and then work from there, but that seems like a lot of work for something that should be relatively simple to work out.

You all are a tremendous help to me.  Thank you for the comments and suggestions.
net-reference.jpg
0
 
Éric MoreauSenior .Net ConsultantCommented:
You need to install on your server the same version of CR you are referencing in your application. CR is not installed by the .Net Framework itself
0
 
CodeCruiserCommented:
>Currently using VB.Net 2005.  CR is *not* installed on the server, but the CR runtime files for .NET Framework 4.0 *are* installed on the server.

You need to install runtime files for .NET 2.
0
 
mlmccCommented:
Also you need to use the assemblies for CR XI R2 in the application rather than the assemblies that came with VS2005.

Which edition and release of CR XI do you have?
Edition - Standard, Professional, Developer, Advanced?
Release - R1 or R2?  Check the version in Crystal  HELP --> ABOUT CRYSTAL
v11.0.x.xxx - R1
v11.5.x.xxx - R2

You need R2 to work with VS2005 and it needs to be the Developer or Advanced edition.

mlmcc
0
 
trbbhmAuthor Commented:
CR XI Developer, v11.0.0.1282.

I do not want to install CR on my server.  I just would like the common runtime files to be the same.

Is there a way to determine exactly which CR runtime files are installed on my server, and then match those with what's on my laptop?
0
 
trbbhmAuthor Commented:
I just checked the \Assembly folders on both my server and my development machine and found the CrystalDecisions.CrystalReports.Engine.resources v13.0.2000.0 are installed on both machines, but in my VB app it appears that I can only access version 10.2.3600.0.  Does anyone have a recommendation on how I can find a way to reference the newer version of the CR assembly?  Is this going to require me updating to a newer version of VB?
CR-ON-DEV.jpg
CR-ON-SERVER.jpg
AddRef.jpg
0
 
trbbhmAuthor Commented:
I just read somewhere that VS.2005 works with .net 2.0 only.   Is this true?  If so, then this seems to be the source of my problem as CR assembly 10.2.2600.0 is the runtime for .net 2.0.
0
 
vastoCommented:
VS2005 supports Frameworks after 2, but there is no way to switch to another Framework from the IDE. I don't understand your problem. You have Crystal Reports working on your computer -> create a setup and install the application on the server . The setup will install also all deendencies. Version 13 of Crystal, which is on the server was installed by somebody too , it didn't came with Windows.
0
 
trbbhmAuthor Commented:
Version and Framework Reference that I found

I'm going to upgrade to VS.2010 anyway, so this will resolve my problem.
0
 
mlmccCommented:
It may if you be sure to only use CR 4 VS2010.

mlmcc
0
 
trbbhmAuthor Commented:
I found the solution on my own.
0
 
bill_homeCommented:
care to share your solution?
0
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.