Skip to Content
0
Oct 24, 2019 at 03:15 PM

Error running vb .net application calling crystal reports

151 Views

I created a vb .NET (VS 2017) application that allows running of crystal reports( Crystal 2016). The code to run the reports is as below. I have no problems running it on the developer machine however on he client machines that run this application which have the crystal runtime (CR for VS redist install 64 bit 13.0.20) installed on them. However, when the application goes to set the data source, I receive the following error after set data source to the dataset retrieved in application and nothing loads in the crystal viewer.

Code

_rpt = New ReportDocument

_rpt.Load(reader.GetValue("Report Directory", GetType(String)) & MyReport.ReportFile)

_rpt.SetDataSource(MyDataSet.Tables(0))

CrystalViewer.ReportSource = _rpt

Error Message

Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to interface type 'CrystalDecisions.ReportAppServer.Controllers.ISCRReportSource'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{31E7715A-8AD0-4D1C-958E-C1BE0A6F2D0C}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))