Skip to Content
Former Member
Mar 24, 2010 at 03:58 PM

Retrieving errors from CrystalReports.ReportAppServer


I am converting a generalized report launching app in VS 2008(.Net Framework 2.0) from using the CRAXDRT RDC to Crystal 2008 ReportDocument.

Most of the app is now working correctly, but I am unable to retrieve errors thrown by the Crystal objects. For example, when allowing the user to set values for parameters, I want to retrieve Crystal's error message, but in the IDE only, I get this error:

System.Runtime.InteropServices.COMException occurred


Message="The types of the parameter field and parameter field current values are not compatible."



at CrystalDecisions.ReportAppServer.Controllers.ParameterFieldControllerClass.SetCurrentValues(String ReportName, String ParameterFieldName, Values Values)


But when I try to retreive this error in a Try-Catch to display for the user, I get the following:

System.TypeLoadException occurred

Message="Could not load type 'CrystalDecisions.CrystalReports.Engine.ReportClosedException' from assembly 'CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'."




at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetParameterValue(String name, Object val)


Any Crystal error that occurs when I'm dealing with the ReportDocument turns into the second "Could not load type" error when I try to access it in error handling. It never reaches the Catch block.

I installed Crystal 2008 using cr2008v1win_rf.exe and cr2008win_sp2.exe.

The ReportAppServer dlls are version 12.0.1100 and are being referenced out of C:\Program Files\Business Objects\Common\4.0\managed

The CrystalReports.Engine (and CrystalDecisions.Shared) is 12.0.2000 and are being referenced out of C:\Program Files\Business Objects\Common\4.0\managed\dotnet2

I have tried copying all the dlls locally and nothing seems to make a difference.

Any suggestions?