2

我在运行时使用 mvc5.2 和 stimulsoft 2014.3 看到错误:描述:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.ArgumentNullException:值不能为空。参数名称:key

源错误:

第 7 行: 第 8 行:
@Html.Stimulsoft().RenderMvcViewerScripts() 第 9 行:
@Html.Stimulsoft().StiMvcViewer("MyViewr", new StiMvcViewerOptions() 第 10 行:{ 第 11 行:ActionGetReportSnapshot = "FromLoadFileReport",

    @Html.Stimulsoft().StiMvcViewer("MyViewr", new StiMvcViewerOptions()
  {
      ActionGetReportSnapshot = "FromLoadFileReport",
      ActionViewerEvent = "ViewerEvent",
      Width = Unit.Percentage(100)
      //Theme = StiTheme.Office2007Black,
      //ActionPrintReport = "PrintReport",
      //ActionExportReport = "ExportReport",
      //ToolbarBackgroundColor = System.Drawing.Color.Silver



  StiReport report = new StiReport();
        string Path = Server.MapPath("~" + ("/Web/Areas/RepUser/HistoryJob.mrt"));
        report.Load(Path);
        report.Compile();

        return StiMvcViewer.GetReportSnapshotResult(HttpContext, report);

显示此错误

4

2 回答 2

0

您应该在 Web.config 文件中添加下一部分:

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.1" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
于 2015-06-11T10:51:13.163 回答
0

stimulsoft 2014 不支持 MVC5。你应该下载 Stimulsoft 2015.2。

Stimulsoft Reports.Web 2014.1 此版本产品兼容.NET Framework 2.0 - 3.5

Stimulsoft Reports.Web 2015.2 正式版 安装包包含安装或卸载产品以及运行设置用户界面的所有内容。本产品兼容 Visual Studio 2010 - 2015 和 .NET Framework 4.0 或更高版本。

https://www.stimulsoft.com/en/downloads/reports-web https://www.stimulsoft.com/en/changes/reports-web?build=2015.2

于 2015-11-24T04:13:11.813 回答