Throw the Exception when creating a Report and pass it a Dataset
:
DataSet ds = new DataSet();
ds.Tables.Add(tabla);
tabla.TableName = "tablename";
Rpt.MyRpt reporte = new Rpt.MyRpt();
reporte.SetDataSource(ds);
The exception happens when debug
and does not happen in other applications
Environment: Visual Studio 2015
Exception data:
Source: mscorlib
Message:
The COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' can not be converted to the interface type 'CrystalDecisions.ReportAppServer.Controllers.ISCRReportSource'. An operation error occurred because the QueryInterface call in the COM component for the interface with IID '{98CDE168-C1BF-4179-BE4C-F2CFA7CB8398}' generated the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE )).
Stack Trace:
in System.StubHelpers.StubHelpers.GetCOMIPFromRCW (Object objSrc, IntPtr pCPCMD, IntPtr & ppTarget, Boolean & pfNeedsRelease) in CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Refresh () in CrystalDecisions.ReportSource.EromReportSourceBase.Refresh (RequestContext reqContext) in CrystalDecisions.CrystalReports.Engine.FormatEngine.Refresh (RequestContext reqContext) in CrystalDecisions.CrystalReports.Engine.ReportDocument.Refresh () in CrystalDecisions.CrystalReports.Engine.Table.SetDataSource (Object val, Type type) in CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal (Object val, Type type) in CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource (DataSet dataSet) in [My code line]