CRM 2011 UR 18 期 - 无法呈现报告

CRM 2011 UR 18 Issue - Cannot Render Report

尝试显示特定报告时出现此错误(在应用程序事件日志中):

异常消息:基 class 包含字段 'reportViewer',但其类型 (Microsoft.Reporting.WebForms.ReportViewer) 与控件类型 (Microsoft.Reporting.WebForms.ReportViewer) 不兼容。

我们在 web.config 中为 CRM 提供了这个:

    <httpHandlers>
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
    </httpHandlers>
...
      <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

我们在某些机器上看到错误,但在其他机器上没有。

此 CRM 计算机已安装 Microsoft Report Viewer 2010 Redistributable Package。正如我在标题中指出的那样,我们有 CRM 2011,UR 18。

我们需要在此处安装不同版本的 Report View 吗?

我们能够解决这个问题。我们必须将 Microsoft Report Viewer 2012 Runtime 安装到 CRM Web 服务器上,https://www.microsoft.com/en-us/download/details.aspx?id=35747

Microsoft 修改了 v2012(即版本 11.0.0.0)的 PublicKeyToken,因此 web.config 编辑也不仅仅是版本更改。

生成的正确 CRMWeb web.config(对于 CRM 2011)是:

 <httpHandlers>
  <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
</httpHandlers>
<compilation defaultLanguage="C#" debug="false">
  <assemblies>
    <add assembly="Microsoft.Crm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add assembly="Microsoft.Crm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add assembly="Microsoft.Crm.Platform.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    <add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  </assemblies>
</compilation>