on 03-24-2010 3:58 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.