2

I am trying to use Report Viewer control in one of my custom web part (on ascx) of SP 2010. As I drop the report viewer control on my ascx it register its assembly on top with assembly version 10.0.0.0. When I deploy my site I get the following error.

Note: I have not added any reference to my project to any of the Report Viewer Assembly.

I even tried to match the version of assembly in web application's web config in handler section but still no effect.

In GAC there are three version of the Microsoft.Reporting.WebForms.ReportViewer 8.0.0.0, 9.0.0.0 and 10.0.0.0 I can not uninstall any of those.

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

Please help me resolving this error.

1 Answer 1

1

You may want to try cleaning your solution(s) and/or adding the reference again:

http://forums.asp.net/t/1284295.aspx/1

Also, do a "find in files" search to verify that there are no vestigial references to either of the two older assemblies (8.0.0.0 or 9.0.0.0):

https://stackoverflow.com/questions/820396/microsoft-asp-net-reportviewer-parser-error

And because I'm curious:

Note: I have not added any reference to my project to any of the Report Viewer Assembly.

Why not? Do you not see it in the "Add Reference" dialog?

6
  • I think I need not to add another reference because I already have Microsoft.ReportingServices.SharePoint.Common and Microsoft.ReportingServices.SharePoint.UI.WebParts added as references and these include Report Viewer Control.
    – V.B
    Jan 3, 2013 at 4:59
  • Yes, but the existing references may be pointing to the older assemblies (8.0.0.0 and 9.0.0.0), not 10.0.0.0 (see the threads in those links). Are you using three different versions of the Report Viewer in parallel? Jan 3, 2013 at 5:09
  • No I am not using 3 versions of RV.And I don't see any reference to older versions either.
    – V.B
    Jan 3, 2013 at 5:14
  • I see the problem is conflict between Microsoft.Reporting.WebForms and the same assembly inside Microsoft.ReportingServices.SharePoint.UI.WebParts.That is why I can not add explicit referece of Microsoft.Reporting.WebForms.
    – V.B
    Jan 4, 2013 at 8:16
  • Ah, cool. Glad you figured it out. With the correct reference in place are you good to go? Jan 4, 2013 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.