cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving errors from CrystalReports.ReportAppServer

Former Member
0 Kudos

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

ErrorCode=-2147213303

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

Source="rptcontrollers.dll"

StackTrace:

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

InnerException:

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'."

Source="CrystalDecisions.ReportAppServer.DataSetConversion"

TypeName="CrystalDecisions.CrystalReports.Engine.ReportClosedException"

StackTrace:

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

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

InnerException:

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?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Moved to Crystal Reports .NET Developer Forum.

Have a look at our samples for info on how to and what to use:

Root Page

http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsHome

Enterprise Samples (including managed and unmanaged ras)

http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsSDKSampleApplications

Non-Enterprise Samples

http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications

Exporting Samples (RAS)

http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting

Thank you

Don

Answers (0)