locked
(Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer) RRS feed

  • Question

  • User-1979913015 posted

     I am trying to use ReportViewer 9 in Visual Studio 8 but I get this error when I try to run the page:

    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 if you can!

    Thanks

    Wednesday, July 2, 2008 3:39 PM

Answers

  • User-1979913015 posted
    Please test it with a new clean project if the viewer works with VS2008.  Another stupid question, are you using viewer for WebForms or WinForms – I am sure there are two separate viewers (it is really stupid question but still please check it).<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><o:p></o:p>If the test above is successful, and if you had previous version in past, your bin folder can have DLLs from both versions.<o:p></o:p>I would suggest trying the following:<o:p></o:p>·         Close the VS solution <o:p></o:p>·         Delete file with extension .suo (it is hidden file so make sure you found one)<o:p></o:p>·         Go to bin folder and delete everything<o:p></o:p>

    ·         Open solution and rebuild it: clean the solution first (Build\Clean Solution), then rebuild solution (Build/Rebuild Solution).

    This solution helped me. I hope it is helpful for someone else.

     

     

    Tt

    Tt<o:p> </o:p><o:p> </o:p>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 3, 2008 12:39 PM

All replies

  • User-1979913015 posted
    Please test it with a new clean project if the viewer works with VS2008.  Another stupid question, are you using viewer for WebForms or WinForms – I am sure there are two separate viewers (it is really stupid question but still please check it).<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><o:p></o:p>If the test above is successful, and if you had previous version in past, your bin folder can have DLLs from both versions.<o:p></o:p>I would suggest trying the following:<o:p></o:p>·         Close the VS solution <o:p></o:p>·         Delete file with extension .suo (it is hidden file so make sure you found one)<o:p></o:p>·         Go to bin folder and delete everything<o:p></o:p>

    ·         Open solution and rebuild it: clean the solution first (Build\Clean Solution), then rebuild solution (Build/Rebuild Solution).

    This solution helped me. I hope it is helpful for someone else.

     

     

    Tt

    Tt<o:p> </o:p><o:p> </o:p>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 3, 2008 12:39 PM
  • User-209725320 posted

    Change in your Web.config all "Microsoft.ReportViewer.WebForms, Version=8.0.0.0,..." to " Microsoft.ReportViewer.WebForms, Version=9.0.0.0,..." and in controls "Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0,..." to "Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0,..."

    It should help

     mw

    Saturday, August 30, 2008 10:48 AM
  • User1864629908 posted

     I tried all of the above as well as removing the bin files and .suo file.  None of these worked.  What did work for me was going to the Solution Explorer -> [Project Name] -> References -> delete the Report viewer reference and readd the correct one.

    Friday, July 24, 2009 3:00 PM
  • User154448021 posted

     I tried all of the above as well as removing the bin files and .suo file.  None of these worked.  What did work for me was going to the Solution Explorer -> [Project Name] -> References -> delete the Report viewer reference and readd the correct one.

     

    Thanks. That solved my issue.

    Thursday, September 10, 2009 2:46 PM
  • User232787578 posted

     Solved mine too.  Should have thought of that!  Thanks

    Friday, September 25, 2009 9:09 AM
  • User-593575503 posted

    Cleaning the solutions works fine for me !


    Thanks,

    Friday, August 20, 2010 5:41 PM
  • User831742134 posted

    Remove the references of Microsoft.Reporting.WebForms,Microsoft.Reporting.Common

    and add them once again of the Version which you have used in web.config.

    Monday, January 9, 2012 8:07 AM
  • User-922479165 posted

    Cleaning the solutions works fine for me as well

    Tuesday, February 14, 2012 11:44 AM