# Visual Basic > Reporting >  The variable 'Reportviewer1' is either undeclared or was never assigned

## BSWhipp

Problems going from 2013 application to 2019 and report issues. I made sure I have v12 of Microsoft.Reportviewer.Winforms and .Common. Latest version of .Webforms Also have error 'Could not load file or assembly Microsoft.Reportviewer.Common, Version=12.0.0.0, Culture=nuetral, PublicKeyToken=89845ddcd8080cc91' or one of its dependencies. They system can not find the file specified.

Was working but could not create another report because of another error about a reference already being there so I upgraded the references. It worked until I opened up another report, now none work.

Why must Microsoft be so hard to deal with?
Thanks

----------


## jdc2000

Possibly useful links:

https://social.msdn.microsoft.com/Fo...?forum=vssetup

https://social.msdn.microsoft.com/Fo...um=lightswitch

https://social.msdn.microsoft.com/Fo...e?forum=aspmvc

https://stackoverflow.com/questions/...rsion-12-0-0-0

----------


## BSWhipp

OK I think I fixed it by updating all the nuget things I needed but now when I click on the form in the Solutions Explorer is opens the form to code. How do I get it back to the forms designer? Thanks again.

----------


## BSWhipp

Well, I added another form and we are back to square one again. So there is something clearly wrong with Reporting in Visual Studio. If I add another form and then try to adda reportviewer to it I get an error on that too. Failed to create component 'ReportViewer. The error message follows: 'System.Runtime.InteropServices.COMException (0x8004D745): A reference to the component 'Microsoft.ReportViewer.Winforms' already exists in the project. Necer had these issues with VS 2013. Is this stuff fixed in a later version of VS than 2019?

----------


## BSWhipp

Install-Package Corrected.Microsoft.ReportingServices.ReportViewerControl.Winforms -Version 150.1358.0 Fixed that issue.

----------


## BSWhipp

it fixed the opening of the form issue. and it fixed the reportviewer issue but the actual report viewer does not show on the new forms. You have to add Me.Controls.Add(Me.Reportviewername) to the InitializeComponent section but then you still can't interact with the reportviewer. Any ideas on that?

----------

