none
Productivity in VS2005 MicrosoftReportViewer control not available in VS2008 MicrosoftReportViewer control RRS feed

  • Question

  • In VS2005 we could 1) create a winforms project, 2) add a dataset, 3) create a local-mode report (rdlc), 4) add a form to host the ReportViewer, then 5) drop a ReportViewer on the form and be presented with an opened smart-tag that allowed us to associate the report with the viewer. Run the project and we were done. In VS2008, When you get to step 5) the smart-tag is not visible (opened or otherwise). Is this a configuration problem or something else we are missing?

    We are using Visual Studio 2008 Database Edition with SQL Server 2005 Developer.


    Update: The problem occurs in a project that was converted from VS2005 to VS2008. 1) add a new form to the project 2) drop a ReportViewer control on the form. A reportviewer1 object is added to the 'form tray' instead of a Dataset, BindingSource and TableAdapter.  Is there something we can change in the converted project that would bring back the desired behavior?
    • Edited by CharlieG Thursday, February 4, 2010 5:54 PM New information
    Thursday, February 4, 2010 5:28 PM

Answers

  • Yes, thank you, I think we figured it out. It was an assembly versioning problem. For the benefit of those that may have this problem, here is what happened:

    1) The workstation had just been flattened and everything reinstalled. SQL Server 2005 developer, then VS2008 (this is important).
    2) The project was copied from another machine to the freshly installed machine.
    3) VS2008 dutifully provided the conversion wizard which was run.
    4) Odd behavior (as mentioned above) starting occurring.

    It turns out that the project had a reference to the GACed 8.0 version of the report viewer control from the old machine (which had SQL S2005 and VS 2005, NOT VS2008). The new install had the GACed 8.0 version of the report viewer control as well, because that's installed when you install SQL 2005), but it doesn't play nice when it's used in VS2008, hence the odd behavior.

    If you create a new VS2008 project with a reportviewer control it will create a reference to the 9.0 reportviewer control in C:\Program Files\Microsoft Visual Studio 9.0\ReportViewer\Microsoft.ReportViewer.WinForms.dll. I suspect that VS would have used a GACed 9.0 reportviewer control if it was available (perhaps if we had installed SQL Server 2008 developer; we didn't).

    So, we deleted the project reference to the GACed 8.0 version and added a new reference to the 9.0 version, cleaned the solution, rebuilt the project and we were back in business.

    Thanks again,
    Charlie
    • Marked as answer by CharlieG Tuesday, February 9, 2010 9:59 PM
    Tuesday, February 9, 2010 9:59 PM

All replies

  • Hi Charlie,

    Thanks for your post.

    VS 2008 also provides the smart tag on ReportViewer control to let you to choose local or server report just same as VS 2005.

    Can you see the smart tag at the right upper corner of the ReportViewer control?

    If you can't see it, I suggest you to repair your installation of Visual Studio. Thanks.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    Friday, February 5, 2010 9:15 AM
    Moderator
  • Hi Charlie,

    Is this issue resolved? Thanks.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    Tuesday, February 9, 2010 8:09 AM
    Moderator
  • Yes, thank you, I think we figured it out. It was an assembly versioning problem. For the benefit of those that may have this problem, here is what happened:

    1) The workstation had just been flattened and everything reinstalled. SQL Server 2005 developer, then VS2008 (this is important).
    2) The project was copied from another machine to the freshly installed machine.
    3) VS2008 dutifully provided the conversion wizard which was run.
    4) Odd behavior (as mentioned above) starting occurring.

    It turns out that the project had a reference to the GACed 8.0 version of the report viewer control from the old machine (which had SQL S2005 and VS 2005, NOT VS2008). The new install had the GACed 8.0 version of the report viewer control as well, because that's installed when you install SQL 2005), but it doesn't play nice when it's used in VS2008, hence the odd behavior.

    If you create a new VS2008 project with a reportviewer control it will create a reference to the 9.0 reportviewer control in C:\Program Files\Microsoft Visual Studio 9.0\ReportViewer\Microsoft.ReportViewer.WinForms.dll. I suspect that VS would have used a GACed 9.0 reportviewer control if it was available (perhaps if we had installed SQL Server 2008 developer; we didn't).

    So, we deleted the project reference to the GACed 8.0 version and added a new reference to the 9.0 version, cleaned the solution, rebuilt the project and we were back in business.

    Thanks again,
    Charlie
    • Marked as answer by CharlieG Tuesday, February 9, 2010 9:59 PM
    Tuesday, February 9, 2010 9:59 PM
  • How to delete the project reference to the GACed 8.0 version and add GACed 9.0

    Monday, May 21, 2012 7:03 AM