Solved

VB.NET Crystal Reports Declaration Causing App to Crash

Posted on 2013-01-09
22
742 Views
Last Modified: 2014-10-29
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.
0
Comment
Question by:trbbhm
  • 9
  • 5
  • 3
  • +3
22 Comments
 
LVL 18

Expert Comment

by:vasto
ID: 38760919
I guess the dll is not in GAC. Try to change copylocal=true
0
 

Author Comment

by:trbbhm
ID: 38760979
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
 
LVL 18

Expert Comment

by:vasto
ID: 38761003
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
 

Author Comment

by:trbbhm
ID: 38761046
I changed "copy local=true", re-built the app, copied the new exe to the app folder on the server, and no change.
0
 
LVL 18

Expert Comment

by:vasto
ID: 38761066
Do you have Crystal reports installed on the server ?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38761287
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
 
LVL 18

Expert Comment

by:vasto
ID: 38761311
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
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 38761385
have you properly installed CR on the server?
0
 
LVL 100

Expert Comment

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

Author Comment

by:trbbhm
ID: 38763356
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
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 38763417
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38763470
>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
 
LVL 100

Expert Comment

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

Author Comment

by:trbbhm
ID: 38768350
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
 

Author Comment

by:trbbhm
ID: 38768489
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
 

Author Comment

by:trbbhm
ID: 38768606
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
 
LVL 18

Expert Comment

by:vasto
ID: 38768717
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
 

Author Comment

by:trbbhm
ID: 38768833
Version and Framework Reference that I found

I'm going to upgrade to VS.2010 anyway, so this will resolve my problem.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 38769250
It may if you be sure to only use CR 4 VS2010.

mlmcc
0
 

Accepted Solution

by:
trbbhm earned 0 total points
ID: 38784540
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
 

Author Closing Comment

by:trbbhm
ID: 39350703
I found the solution on my own.
0
 

Expert Comment

by:bill_home
ID: 40411113
care to share your solution?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

14 Experts available now in Live!

Get 1:1 Help Now