Parse Error Message:the base class include the field 'reportviewer1',but its type (Microsoft.reporting.webforms.reportviewer) is not compatible with the type of control (Microsoft.reporting.webforms.reportviewer)
This Error Occur due to Usage of different version of ReportViewer in Same .Net Project . It may happen when you have referenced a different version of ReportViewer dll files as compared to Version of Report Viewer dll ReportViewer Control is using and referenced in web.config file
So we need have same version of Report Viewer dll file in web.config file that matches with Control using and as well as version that we have referenced .
So Dll File we are using is - Microsoft.Reporting.WebForms .
Fix For This Error -
Go to your web.config file and Search for following code -
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
YOU CAN SEE VERSION IN ABOVE CODE "VERSION=10.0.0.0" OR IT MAY BE 11.0.0.0 OR BELOW 10 .SO WE NEED TO MAKE REFERENCE TO SAME ASSEMBLY IN ORDER TO MATCH THE VERSION OF ASSEMBLY REFERENCED WITH CONTROL USING ASSEBLY
SO HERE CONTROL IS USING 10.0.0.0 VERSION OF ASSEMBLY
STEP FOR FIX Parse Error
1. Right Click on your Website or WebApplication in Solution Explorer
2. Then Click on Add Reference
3. Then Search For Reporting
4. Then Checkmark the Checkbox for Microsoft.ReportViewer.WebForms with Same Version 10.0.0.0 or other that is available in your web.config
5. Now Click ok
6. Rebuild Your Solution and Now Error Should be Resolved
If Any Problem Exist Still then Feel Free to Put your Query In Comment Here .
0 Comment to "Parse Error The base class includes the field ‘reportViewer’, but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms"
Post a Comment