Microsoft ASP.NET ReportViewer Parser Error

CodeMonkey1313 picture CodeMonkey1313 · May 4, 2009 · Viewed 25.5k times · Source

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?

Answer

CodeMonkey1313 picture CodeMonkey1313 · May 4, 2009

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.