简体   繁体   中英

Crystal Report - Method not found error in MVC 5

I am using Crystal Report in a MVC application. Code in controller to generate the report is,

ReportClass rptH = new ReportClass();
rptH.FileName = Server.MapPath("~/Report/SampleReport.rpt");
rptH.Load();
rptH.SetDataSource(viewGrns);
Stream stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
return File(stream, "application/pdf");

System Configuration:

Windows 7
SAP Crystal Reports, version for Microsoft Visual Studio - 13.0.10.1385
SAP Crystal Reports runtime engine for .NET Framework (64-bit) - v.13.0.13.1597

I get the below error

Method not found: 'CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag CrystalDecisions.ReportAppServer.ReportDefModel.ISCRExportOptions.get_ExportOptionsEx()

So I checked with my colleague's machine which has Crystal Report v.13.0.12.1494 and it works fine. I tried with v.13.0.16.1954 and v.13.0.12.1494 but still getting the same error.

Thanks in advance for any assistance.

Solved this issue by installing CRforVS_13_0_12.exe which upgraded

SAP Crystal Reports, version for Microsoft Visual Studio - 13.0.10.1385

to

SAP Crystal Reports, version for Microsoft Visual Studio - 13.0.13.1597

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM