2012-05-08 28 views
0

我在VS2010上构建了一个WebApp(ASP.NET 2.0 C#)。ASP.NET 2.0 VS2010中哪个ReportViewer版本?

应用程序工作正常,我想我把报告功能,所以我安装的ReportViewer 2010

当我拖着从Tookbox ReportViewer控件并运行页面,我得到了某种集引用错误的,所以我说参考中的Microsoft.ReportViewer.WebForm。但是,只有8.0.0.0版本。

当我尝试运行,它给了我:

The base class includes the field 'ReportViewer1', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer). 

我认为发生这种情况,因为我并没有提及Microsoft.Reporting.WebForm 10.0.0.0。 任何人都知道为什么我没有在我的参考列表中,我如何得到它?

谢谢

回答

0

VS 2010通常与Microsoft.Reporting.WebForm 10.0.0.0一起使用。我想知道为什么你最终选择了超旧版本8.0.0.0。但是,您可以在web.config中添加manually Add or Remove References和/或手动将Microsoft.Reporting.WebForm 8.0.0.0替换为Microsoft.Reporting.WebForm 10.0.0.0

如果由于某种原因,您没有在您的计算机上安装它,则可以安装Microsoft Report Viewer 2010 Redistributable Package

虽然我使用ASP.Net 2.0和Microsoft.Reporting.WebForm 10.0.0.0以及迄今为止,我没有任何问题。编译器警告有关框架4.0被Microsoft.Reporting.WebForm引用,并建议升级到ASP.Net 4.0