Solved

Missing File Crash on Crystal Reports C# Application?

Posted on 2010-09-07
12
1,099 Views
Last Modified: 2013-11-20
Hello again everyone.  I built an application for a client in C++ which writes to an access database and opens a separate executable written in C# when the user prints (the easiest way I found to add in crystal reports support).  Since the database and C# executable are written to, they are located in a publicly accessible folder (C:\Users\Public\Documents\) on Windows 7, and All Users on Windows XP.

The problem is that whenever the user attempts to run the C# program, it crashes.  A generic error message pops up saying that the program as stopped working.  One of the clients machines indicated that there was a "FileNotFound" exception, so I used Dependency walker to see what might be missing.  The typical suspects of "IEFRAME.dll" and "SHLWAPI.dll" come up, but that's all it tells me.  I then confirmed on the internet that these were harmless suspects.  Dependency Checker says it isn't missing anything.  I tried using WinDB after getting a Kernal dump from one of the clients, but it said the error was in Sys32 (which likely means the system was asked to do something it couldn't).  Trying to run the C# program directory (as opposed to through the main program) results in the same error.  The C++ program works perfectly, and the necessary support files (.NET Framework 3.5, VS Redistributable 2008) work on a variety of client PCs without problem.  The C# executable used to work just fine until I edited it to add a few new columns but as far as I know this shouldn't have changed requirements.

Any suggestions on what I can do from here to narrow down the problem?  If you would like more information, whether it be details of the dump, or anything along those lines, please ask.  I'd be happy to provide it.  Thanks in advance for your help.
0
Comment
Question by:HeavyBlade
  • 8
  • 4
12 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 33623991
How did you install the C#/Crystal application

Is run on the server?

Is it run as the logged in user or is it run as a system account?

mlmcc
0
 

Author Comment

by:HeavyBlade
ID: 33624003
Hello mimcc, I'm a great fan of your work.  

The program is installed as part of a MSI built in Visual Studio along with the C++ distributable.  It gave me a list of three dependency drivers, which are installed along with the program into the same directory as the C# executable.

Both programs are run locally for the logged in user.  The main application (C++) is stored in Program Files.  In order to ensure that the user will have permission to read/write the database for the C# application, the database (and said app) are stored in C:\Users\Public\Documents\.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 33624059
Can you run the C# application by itself?

mlmcc
0
 

Author Comment

by:HeavyBlade
ID: 33627415
No, I can't run the new version of the C# application by itself on the client machine, though I could with the old version.  I can run the C# application by itself on my system though.
0
 

Author Comment

by:HeavyBlade
ID: 33628914
Sorry, I'm not sure my last post was very clear.

It is possible to run the C# application by itself.  Normally, data is passed into it through the C++ application to generate a report, however, you can open a blank report by directly opening the C# app.

My client receives the generic error message whenever he tries to open the new version of the C# application, either through the other application, or directly.  The client is still able to open the old version of the C# application both through the other application and directly.

0
 

Author Comment

by:HeavyBlade
ID: 33637264
I've attached the error message, in case it is of any help resolving this problem.
Here is the rest of the error information from "More Problem Details":

"Description:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: me_employee_report.exe
Problem Signature 02: 1.0.0.4
Problem Signature 03: 4c7ff703
Problem Signature 04: ME_Employee_Report
Problem Signature 05: 1.0.0.4
Problem Signature 06: 4c7ff703
Problem Signature 07: 3
Problem Signature 08: 6
Problem Signature 09: System.IO.FileNotFoundException
OS Version: 6.1.7600.2.0.0.256.4
Locale ID: 1033

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt"
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:HeavyBlade
ID: 33637273
My apologies, the file didn't attach properly.  It should display this time.

ME-Error.bmp
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 33651237
Does EVERYONE have execute and read permissions on the exe file?
How about on the report files?

mlmcc
0
 

Author Comment

by:HeavyBlade
ID: 33676679
Sorry Mimcc, I didn't get notification of your response for some reason.  Everyone has access to both the exe file and the report files.

The problem turned out to be that Crystal Reports was looking for a driver file locally and couldn't find it.  Unfortunately, this driver was not detected by Visual Studio 2008 when creating the installation MSI.  After a lot of trial and error, I was able to track down the missing drivers and get the program working.
0
 

Accepted Solution

by:
HeavyBlade earned 0 total points
ID: 33708956
For the record, the files were:
 -Microsoft.ReportViewer.Common.dll
 -Microsoft.ReportViewer.ProcessingObjectModel.dll
 -Microsoft.ReportViewer.WinForms.dll
and two Crystal specific drivers:
 -CrystalDecisions.CrystalReports.Engine.dll
 -CrystalDecisions.Shared.dll

Required locally in the C# application directory.

Thanks everyone for your help.
 
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 33712452
I am curious why you needed the MS reportviewer fields for a Crystal report.  They aren't related to Crystal at all.

mlmcc
0
 

Author Comment

by:HeavyBlade
ID: 33719558
Well, I do use the Report Viewer tool in the C# application in order to view the report.  Other then that, the only real code change it uses specifies that the program print in landscape.  If that doesn't explain the need for MS reportviewer fields, then I'm uncertain as well.  Is there anyway I could check?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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

22 Experts available now in Live!

Get 1:1 Help Now