Solved

Missing File Crash on Crystal Reports C# Application?

Posted on 2010-09-07
12
1,084 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
Comment Utility
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
Comment Utility
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
Comment Utility
Can you run the C# application by itself?

mlmcc
0
 

Author Comment

by:HeavyBlade
Comment Utility
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
Comment Utility
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
Comment Utility
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
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

 

Author Comment

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

ME-Error.bmp
0
 
LVL 100

Expert Comment

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

mlmcc
0
 

Author Comment

by:HeavyBlade
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

18 Experts available now in Live!

Get 1:1 Help Now