代码之家  ›  专栏  ›  技术社区  ›  Saj

未捕获错误:Sys。InvalidOperationException:尝试运行报告时,“DocMapUpdatePanelId”不是属性或现有字段

  •  0
  • Saj  · 技术社区  · 7 年前

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

    这就是所谓的报告查看器:

    <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" %>
    

     <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>
    

    也在系统下。webServer I具有以下功能:

    <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 回复  |  直到 7 年前
        1
  •  1
  •   Tetsuya Yamamoto    7 年前

    尝试添加此 ReportViewer 名为的HTTP处理程序 ReportViewerWebControlHandler 在web中。内部配置 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>
    

    Microsoft.ReportViewer.WebForms 装配,坚持使用最新或可用的装配参考(即12.0)并删除重复的参考。

    参考:

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