cancel
Showing results for 
Search instead for 
Did you mean: 

Setting SetDataSource crashes app on development machine

0 Kudos

I use the following code to set the data source for a crystal report running c# Visual Studio 2017,

MReport mp = MReport();

mp.SetDataSource((DataTable)memberData);

When the line mp.SetDataSource is encounter the program crashes. It just says "Software ProgramName crashed" then the program closes. This used to work. The only changes I've made to my machine is uninstall Office and reinstall it. I don't see that that matters but giving that info just in case. Anyway all my programs that used to work crash at this same line, NO CHNAGES have been made to the software. I have Crystal Reports version 13.0.5 installed on my development machine. What is the problem?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I upgraded my project to .NET Framework 4, and everything started working. So to recap I Installed SP 24 for VS, and then upgraded the project to NET Framework to 4.0 and it fixed the problem.

Answers (10)

Answers (10)

0 Kudos

When I click to add a reference I see;

Assemblies/ -Framework-Extensions-Recent

Projects/-Solution

Shared Projects/-Solution

Com/-Recent

No Net tab. I can search and add those assemblies, but still receive the same error.

0 Kudos

When adding CR assemblies to your project don't browse to the file, use the .NET tab.

CR runtime is only installed into the GAC so they don't exist on a runtime only PC.

Don

0 Kudos

You can download debugdiag from Microsoft and capture the crash and see what it says.

Don

0 Kudos

My app uses Net Framework 3.5. Could that be the problem? I have it set to x86.

In the mean time I've loaded everything to a different machine and it crashes, but gives the error,

System.IO.FileNotFoundException occurred HResult=0x80070002 Message=Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified. Source=<Cannot evaluate the exception source> StackTrace: <Cannot evaluate the exception stack trace>

0 Kudos

The file not found is in;

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\

but not in;

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet

0 Kudos

Add try/catch around that line and catch the inner exception.

Try a new report with one field and see if that works.

Don

0 Kudos

Already done try/catch, and it dosen't catch anything the program just crashes. That's why I put the results from event viewer above. I'll get back with another report. That would definitly tell us something.

0 Kudos

Added new report with one field. It crashes at same line. By the way I copied this whole program to my laptop and it worked fine. So something is wrong with my desktop. As I mentioned before, it used to work on my desktop.

0 Kudos

Installed SP 24, deleted references to crystal reports, then put them back to make sure had latest version. Still doesn't work, still crashes at same line.

0 Kudos

4.6.2 will work fine... supports anything 3.5 and above

0 Kudos
0 Kudos

I have windows 10 Enterprise 64 bit os with 6GB of memory and a Intel(R) Core(TM) i7 CPU 2.66GHz , the latest version of NET installed is NET4.6.2 Can I install the SP24, doesn't look like it. Looks like I need NET4.7

NET4.7 want install on my machine.

0 Kudos

Office installs the DAO engine or some other Dataset driver that CR needs.

Open your report in Crystal Reports Designer and do a set lcoation and Verify database and see if that works.

Upgrade to SP 24 and it may work.

Don

0 Kudos

Still didn't work. Here is the event log results;

Log Name: Application Source: Application Error Date: 1/9/2019 9:07:35 AM Event ID: 1000 Task Category: (100) Level: Error Keywords: Classic User: N/A Computer: C2 Description: Faulting application name: P3.exe, version: 3.0.2.9, time stamp: 0x5c35ffec Faulting module name: ntdll.dll, version: 10.0.10240.17889, time stamp: 0x5b0e6869 Exception code: 0xc0000005 Fault offset: 0x0003cefc Faulting process id: 0x46a4 Faulting application start time: 0x01d4a8248cab67de Faulting application path: N:\VS2017Projects\P33\P3\bin\Debug\P3.exe Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll Report Id: 98f9e714-7a59-45fc-a1f2-c73f1665fdbd Faulting package full name: Faulting package-relative application ID: Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Application Error" /> <EventID Qualifiers="0">1000</EventID> <Level>2</Level> <Task>100</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2019-01-09T14:07:35.000000000Z" /> <EventRecordID>360619</EventRecordID> <Channel>Application</Channel> <Computer>C2</Computer> <Security /> </System> <EventData> <Data>P3.exe</Data> <Data>3.0.2.9</Data> <Data>5c35ffec</Data> <Data>ntdll.dll</Data> <Data>10.0.10240.17889</Data> <Data>5b0e6869</Data> <Data>c0000005</Data> <Data>0003cefc</Data> <Data>46a4</Data> <Data>01d4a8248cab67de</Data> <Data>N:\VS2017Projects\P3\P3\bin\Debug\P3.exe</Data> <Data>C:\WINDOWS\SYSTEM32\ntdll.dll</Data> <Data>98f9e714-7a59-45fc-a1f2-c73f1665fdbd</Data> <Data> </Data> <Data> </Data> </EventData> </Event> Log Name: Application Source: .NET Runtime Date: 1/9/2019 9:07:35 AM Event ID: 1026 Task Category: None Level: Error Keywords: Classic User: N/A Computer: C2 Description: Application: P3.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException at <Module>.DbLogonInfo.{dtor}(DbLogonInfo*) at <Module>.DbFreeLogonInfo(DbLogonInfo*) Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name=".NET Runtime" /> <EventID Qualifiers="0">1026</EventID> <Level>2</Level> <Task>0</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2019-01-09T14:07:35.000000000Z" /> <EventRecordID>360618</EventRecordID> <Channel>Application</Channel> <Computer>C2</Computer> <Security /> </System> <EventData> <Data>Application: P3.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException at <Module>.DbLogonInfo.{dtor}(DbLogonInfo*) at <Module>.DbFreeLogonInfo(DbLogonInfo*) </Data> </EventData> </Event>

0 Kudos

I reinstalled the SDK, same problem.

DellSC
Active Contributor
0 Kudos

Some parts of Crystal are dependent on libraries from MS Office. In the past, I've seen the full version of Crystal Reports go through a reinstall/repair install process when MS Office is updated on a computer. I recommend reinstalling the SDK on your development machine to see whether that will resolve the issue.

-Dell