未捕获错误:Sys.InvalidOperationException:' DocMapUpdatePanelId'尝试运行报表时,它不是属性或现有字段

时间:2017-09-25 01:09:45

标签: c# asp.net reportviewer

我的报告查看器出现问题。我已经在我的机器上安装了Reports Viewer 2015 Runtime,但每当我尝试运行报告时,我都会得到以下结果:

未捕获错误:Sys.InvalidOperationException:' DocMapUpdatePanelId'不是财产或现有领域。

这就是调用报告查看器:

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" AsyncRendering="true" SizeToReportContent="True" Width="100%" Height="500px"> </rsweb:ReportViewer>

在aspx页面的顶部,我有:

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

我的web.config是这样的:

 <system.web>

<compilation debug="true" targetFramework="4.5.2">
  <assemblies>
    <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
    <add assembly="Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
    <add assembly="Microsoft.ReportViewer.ProcessingObjectModel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
    <add assembly="Microsoft.ReportViewer.Design  , Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
  </assemblies>
  <buildProviders>
    <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
  </buildProviders>
</compilation>
<httpHandlers>
  <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
  <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
</httpHandlers>

也在system.webServer下我有以下内容:

<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" resourceType="Unspecified" />
  <add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified" />

此时,我不确定如何解决这个问题。

由于

1 个答案:

答案 0 :(得分:1)

尝试在ReportViewer部分的web.config中添加名为ReportViewerWebControlHandler的{​​{1}} HTTP处理程序(请注意system.webserver设置为resourceType):

Unspecified

如果您有多个<system.webserver> <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified" /> </system.webserver> 程序集的引用,请坚持使用最新或可用的程序集引用(即12.0)并删除重复的引用。

参考:

ReportViewer gives JS error: 0x800a139e 'DocMapUpdatePanelId' is not a property or an existing field