Skip to Content

Setting SetDataSource crashes app on development machine

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

11 Answers

  • Best Answer
    Jan 28 at 03:23 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 08 at 03:27 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 08 at 09:15 PM

    I reinstalled the SDK, same problem.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 08 at 11:02 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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: http://schemas.microsoft.com/win/2004/08/events/event"> 1000 2 100 0x80000000000000 360619 Application C2 P3.exe 3.0.2.9 5c35ffec ntdll.dll 10.0.10240.17889 5b0e6869 c0000005 0003cefc 46a4 01d4a8248cab67de N:\VS2017Projects\P3\P3\bin\Debug\P3.exe C:\WINDOWS\SYSTEM32\ntdll.dll 98f9e714-7a59-45fc-a1f2-c73f1665fdbd 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 .DbLogonInfo.{dtor}(DbLogonInfo*) at .DbFreeLogonInfo(DbLogonInfo*) Event Xml: http://schemas.microsoft.com/win/2004/08/events/event"> 1026 2 0 0x80000000000000 360618 Application C2 Application: P3.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException at .DbLogonInfo.{dtor}(DbLogonInfo*) at .DbFreeLogonInfo(DbLogonInfo*)

  • Jan 09 at 03:09 PM
    Add comment
    10|10000 characters needed characters exceeded

    • 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.

  • Jan 09 at 09:23 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 14 at 05:55 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 15 at 06:16 PM

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

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

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • 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.

  • Jan 16 at 08:36 PM

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

    Don

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Jan 24 at 10:09 PM

    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

    Add comment
    10|10000 characters needed characters exceeded