views:

1112

answers:

2

I've been using a MS ReportViewer component in a website for a while now, but recently I've been getting the error shown below.

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

<rsweb:ReportViewer ID="xyz" runat="server" Width="100%" Font-Names="Verdana" Font-Size="8pt" Height="400px" ProcessingMode="Local" ShowExportControls="false">

Now, I get this error in Visual Studio as well as in production. I have the ReportViewer Redistributable installed in production.

Am I somehow missing a reference in my project, or something?

A: 

I discovered the answer: Somehow the reference to version 9 of Microsoft.Reporting.WebForms got switched to version 8. This caused the error. So deleting the reference and adding in the correct version of the reference seems to have fixed the problem.

Edit:

Well, according to the previous version of the .vbproj file, it was a reference to 9, despite that the project references properties screen told me 8. In short I'm not really sure what managed to get screwed up, but it seems to be working now.

If anyone has experienced this or has some insight, please contribute.

MasterMax1313
A: 

Having the same issue. Clean Windows 2008 Server install with SQL Server 2005 and SQL Reporting. The server hosts the site. Installed ReportViewer 2008 SP1. Web.config references version 9.0.0.0.

The same error message comes up: The base class includes the field but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer).

Searched online and lots of people experience the same issue. Some people suggest manually editing project file. I managed to fix it by setting Specific Version = True (Version=9.0.0.0) in the Solution Explorer->[Web Project Name]->References->Microsoft.Reporting.WebForms->Properties.

In one of the environments we also found Microsoft.Reporting dlls in the web bin folder. And, they were conflicting with the dlls registered in the GAC. Deleting of the dlls solved the issue.

Ruslan Urban