cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Crash App when Setting SetDataSource(DataSet)

Former Member
0 Kudos

Running VB.NET 4.0 Full

VS 2010

Everytime we use SetDataSource and use a DataSet it Crashes the application but this only happens when the App is installed it does not happen in the Development Environment.  With our Installer we have .Net 4.0 Full, and the  CRRuntim_32bit_13_0_4.msi as Prerequisites to installing the app and also have the CRRuntime_13_0_4.msm merge module included.  Is there something that we are not including in the installer that needs to be in order to prevent this function from crashing our app??

Any help would be appreciated, and if more information is needed let me know.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Define crash; error? Behavior? Symptom?

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

What happens is when i try to run a report in the app after it is installed it will have a wait cursor and then Wiindows will pop up a message saying you app has crashed.  I have error handling but none of it catches the error.  So i added a large amount of logging to see where it stops working.  The like it doenst get past is CR.SetDataSource(mDataSetLocal). 

CR is a CrystalDecisions.CrystalReports.Engine.ReportDocument.

mDataSetLocal is a  Data.DataSet. 

Also like i mentioned above i am not able to duplicate this in my Development Environment.  If more information is needed please let me know

former_member188030
Active Contributor
0 Kudos

Is there anything in the Event Viewer - application Log?

Just as a test, instead of passing the dataset the repot could you print the dataset (may be to a datagrid or something) and see if it reproduces the issue? This will take Crystal out of the picture.

Try running DebugDiag to analyse the Crash.

Thanks,

Bhushan.

Former Member
0 Kudos

Ok after running DebugDiag that Bhushan Hyalij suggested i was able to catch the exception thats causing the crash.

The error is as follows:

In SMS_Main__PID__2168__Date__08_31_2012__Time_10_29_51AM__507__Second_Chance_Exception_E0434352.dmp the assembly instruction at KERNELBASE!RaiseException+58 in C:\Windows\System32\KERNELBASE.dll from Microsoft Corporation has caused a CLR Exception on thread 21 with the following error information:

    Type:   System.IO.FileNotFoundException

    Message:   Could not load file or assembly 'file:///C:\Program Files\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.

Shouldn't this file be installed with one of the Crystal installer items that I am distributing??

former_member188030
Active Contributor
0 Kudos

Few things to try.

Manually check if the file exists at te specified location.

See if your app.config has following.

<?xml version="1.0"?>

<configuration>

  <startup useLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

  </startup>

</configuration>

If this does not work,

On your dev machine, go to project Properties - Reference Paths and set the folder as

"C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\" recompile and redeploy the application.

The location it is searching for 'dotnet1' does not exist.

Hope this helps,

Bhushan.

Former Member
0 Kudos

The file is located on the installed machine and the lines that you suggested are already in the app.config

I dont believe that changing the reference paths will help because this issue happens on both 32 and 64 bit machines

Former Member
0 Kudos

After double checking the path i noticed that the file that it is looking for is one directory higher then where it is looking

Former Member
0 Kudos

After Creating the exact directory that is being looked at and adding the DLL to it i receive a different error

In SMS_MA~2.DMP the assembly instruction at KERNELBASE!RaiseException+58 in C:\Windows\System32\KERNELBASE.dll from Microsoft Corporation has caused a CLR Exception on thread 19 with the following error information:

    Type:   System.IO.FileLoadException

    Message:   Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

Former Member
0 Kudos

following the instructions on that link did not fix the issue.  The app is still crashing and is still throwing the following error message:

In SMS_MA~1.DMP the assembly instruction at KERNELBASE!RaiseException+58 in C:\Windows\System32\KERNELBASE.dll from Microsoft Corporation has caused a CLR Exception on thread 20 with the following error information:

    Type:   System.IO.FileNotFoundException

    Message:   Could not load file or assembly 'file:///C:\Program Files\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.

former_member183750
Active Contributor
0 Kudos

Check that the DLL is in :///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86 directory.

From your description I think this is a Win app, not a web app(?). In the case of a win app, you will have have an app.config file that has the info as per Bhusha'n's post. Note that as per the referenced KB you had to create this config file on your development machine. There the file is called app.config. After you compile and deploy, the file has the name of your app exe. E.g.; my_app.exe would have my_app.config.

- Ludek

Former Member
0 Kudos

The file is located in the directory that you listed above.

You are correct that it is Win app and like i stated before those line are already in the app.config in the solution.  Now we are not distributing the "my_app.config" file.  Should we be??

Former Member
0 Kudos

OK soi the problem was that i was not distributing the config file with the installer and now that i am the issue has been resolved. 

Thank you very much

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I got the Same Error

Please tell me what I do with Application and

What I do with Client Machine

former_member183750
Active Contributor
0 Kudos

Please create a new Discussion.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter