0

我使用 Stimulsoft,当我想生成报告时,我看到了这个错误:

 CS0121: The call is ambiguous between the following methods or properties: 'Stimulsoft.Report.Mvc.StiMvcBaseHelper.Stimulsoft(System.Web.Mvc.HtmlHelper)' and 'Stimulsoft.Report.Mvc.StiMvcBaseHelper.Stimulsoft(System.Web.Mvc.HtmlHelper)'

和我的 .cshtml 文件:

@using Stimulsoft.Report.Mvc

@{
  ViewBag.Title = "GetCardReportS";
}
<head>
   @Html.Stimulsoft().RenderMvcViewerScripts();
</head>

@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions() {
    ActionGetReportSnapshot = "GetReportSnapshot",
    ActionViewerEvent = "ViewerEvent",
    ActionPrintReport = "PrintReport",
    ActionExportReport = "ExportReport",
    ActionInteraction = "Interaction"
})
4

2 回答 2

2

您应该明确指定要使用的属性的完全限定名称。

您的引用中可能有多个同名的属性- 您是否引用了同一个库 ( Stimulsoft) 的两个不同版本?

更新:

您很可能正在使用该Stimulsoft库的两个不同版本。使用“模块”窗口,您将能够正确调查它:

在运行时\调试模式下:调试-> Windows -> 模块。

于 2013-12-28T08:42:06.513 回答
1

这两种类型似乎是相同的,因此它们必须从不同的程序集中加载。确保只加载一个或多个 Stimulsoft 程序集版本。Visual Studio 的“模块”窗口显示程序集列表。例如,您可能在 web.config 中有多个引用。

于 2013-12-28T08:44:25.620 回答