[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VB.NET Crystal Reports Declaration Causing App to Crash

Posted on 2013-01-09
22
Medium Priority
?
874 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
[X]
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
  • 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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 70

Expert Comment

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

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 70

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
 
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 101

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 101

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

649 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