Crystal Reports Throw "E_NOINTERFACE" when you report.SetDataSource (ds);


Throw the Exception when creating a Report and pass it a Dataset :

DataSet ds = new DataSet();
tabla.TableName = "tablename";

Rpt.MyRpt reporte = new Rpt.MyRpt();

The exception happens when debug and does not happen in other applications

Environment: Visual Studio 2015

Exception data:

Source: mscorlib



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]

asked by Oaxas 16.11.2017 в 20:28

2 answers


I had different "SAP Crystal Reports Runtime Engine" for 32 and 64 bits.

13.0.15 (x86)

13.0.21 (x64).

Apparently, version 13.0.21 does not have backward compatibility, I suppose that other applications loaded the 0.15 for it did not throw the exception.

  • 1.- Completely uninstall version 13.0.21
  • 2.- Remove references to crystal reports
  • 3.- Manually add references 13.0.2000 (in my case the correct one)

By performing these steps I throw a different error:

Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports 
for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet1\crdb_adoplus.dll' 
or one of its dependencies. The system cannot find the file specified.

Which is a mistake more than documented and I only had to:

4.- Apply the following configuration in my app.config.

<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"     />
answered by 17.11.2017 в 01:54

I had the same problem. If you want to stay with version 13.0.21 you must uninstall any previous version, install the runtimes of 13.0. 21 and restart (if it's a server, with runtimes it's enough).

If you install Visual Studio 2017, you will see that you can not open the .rpt, that's because you need CR for VS version 13.0.21. Same procedure, uninstall all previous version, install version 21 , then restart the pc. You should change the references of your project to the updated CR dlls.

answered by 17.11.2017 в 14:45