ReportView 2005 VS ReportView 2008
关于ReportViewer控件的问题:
Configuration info
IDE: Visual Studio 2008 (SP2)
Project Type: Website
Language: C#
1, 如果在一台机器上同时装有ReportViewer 2005 & ReportViewer 2008,ASPX页面中对程序集的引用版本应该和Web.config文件中一致,否测会出现编译错误
如:
ASPX中为: <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
Web.config中:
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>
...
</system.web>
2,在使用ReportViewer的是时候添加this section in web.config/system.web/httphandlers
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />