Welcome to David Sandor Sign in | Join | Help
in Search

Professional Software Architecture

SOLVED: 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).

This one plagued me for hours.  Hope this solution finds you well.

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).

So you need to make sure you install the reporting services redistributable I blogged about earlier.

The next part saves you from having to recreate your project file.  PLEASE be careful this is surgery.

  1. Edit your website project file (.csproj, .vbproj) in notepad.  If you are using a file based website it will be your .sln file.
  2. Look for ALL references to Microsoft.Reporting and remove the <REFERENCE> tags (beginning tag to ending tag, content and tags).
  3. Save your project (or solution) file.
  4. Remove all assembly references, handlers, and modules from your web.config (related to the Microsoft Reporting namespace).
  5. Load your project back up.  And add the ReportViewer control back in to your toolbox (strangely enough when I did this it was renamed from MicrosoftReportViewer to ReportViewer even though the assembly reference was the same).

Compile and run and this should now work.  This error is apparently related to an upgraded solution/project.

 

Published Wednesday, July 16, 2008 5:42 PM by david
Anonymous comments are disabled

This Blog

Syndication

Powered by Community Server (Personal Edition), by Telligent Systems