简单记录一下:
开发中:
1.一直提示没有给DataSet1绑定数据实例
2.报表和页面间参数传递问题
3.读取各种数据源问题
发布后:
1.提示两个程序集冲突问题解决
2.要将reportviewer的5个关键dll复制到bin目录中
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.DataVisualization.DLL
Microsoft.ReportViewer.ProcessingObjectModel.DLL
Microsoft.ReportViewer.WebForms.DLL
Microsoft.ReportViewer.WinForms.DLL
3.配置webconfig 指定版本信息
1 <system.web> 2 <pages validateRequest="false"> 3 </pages> 4 <httpHandlers> 5 <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" /> 6 </httpHandlers> 7 <sessionState mode="InProc" timeout="300" /> 8 <httpRuntime maxRequestLength="40000" requestValidationMode="2.0" executionTimeout="18000" /> 9 <compilation debug="true" targetFramework="4.0"> 10 <assemblies> 11 <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" /> 12 <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" /> 13 <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> 14 </assemblies> 15 <buildProviders> 16 <add extension=".html" type="System.Web.Compilation.PageBuildProvider" /> 17 <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> 18 </buildProviders> 19 </compilation> 20 </system.web> 21 22 23 <system.webServer> 24 <validation validateIntegratedModeConfiguration="false" /> 25 <handlers> 26 <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> 27 </handlers> 28 </system.webServer>
4.发布到正式环境,正式上并没有装任何关于reportviewer和sql有关的东西,报表页面会显示 Object reference not set to an instance of an object.
安装reportviewer.exe 提示需要安装Microsoft system CLR types for SQL Server 2012 。去微软官网下载,依次安装。
页面刷新。
5.reportviewer和ie11不兼容解决方法: 如图:
设置ie11的兼容模式即可解决。
先简短的记录一下。后面再补全。