简体   繁体   English

Crystal Report-MVC 5中找不到方法错误

[英]Crystal Report - Method not found error in MVC 5

I am using Crystal Report in a MVC application. 我在MVC应用程序中使用Crystal Report。 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. 因此,我检查了同事的计算机,该计算机具有Crystal Report v.13.0.12.1494,并且工作正常。 I tried with v.13.0.16.1954 and v.13.0.12.1494 but still getting the same error. 我尝试使用v.13.0.16.1954和v.13.0.12.1494,但仍然遇到相同的错误。

Thanks in advance for any assistance. 在此先感谢您的任何帮助。

Solved this issue by installing CRforVS_13_0_12.exe which upgraded 通过安装已升级的CRforVS_13_0_12.exe解决了此问题

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. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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