I can not get the report viewer to work on VS 2019
Asked Answered
J

4

5

On Visual Studio 2019 I have added the Microsoft RDLC Report Designer from NuGet packages and I went ahead and added the Microsoft.ReportViewer.Winforms.dll to the project as well. I also created a .xsd and a .rdlc The reportviewer tool shows up on my toolbox and I am able to drag and drop it onto the form. The problem is, when I drop the report viewer tool onto my form, it doesn't open the report view. Instead, it goes to the bottom of the form, just like the timer tool does. I double click on it and it does nothing. I followed the same steps on VS 2017 and was able to create a report.

I already uninstalled the packages and re-installed them and it keeps behaving the same way.

I expect the report viewer to display as it did in VS 2017

Joyann answered 8/7, 2019 at 17:3 Comment(4)
MS Are aware of this bug it seems. See the dev community post here which gives a (hopefully temporary) solution.Rennie
I got it to work by changing the NuGet package version. There is a problem with the Microsoft.ReportingServices.ReportViewerControl.Winforms NuGet package version 150.1358.0 package install. It isn't installing the Microsoft.ReportViewer.DataVisualization and the ProcessingObjectModule reference. I installed the 150.900.148 version of that package and it worked.Joyann
Interesting. That's slightly less of a downgrade the than one in the link I gave. I'll give it a go later.Rennie
@Joyann thank you , version 150.900. works for me (vs 2019)Rettarettig
M
4

I'm using version 150.1404.0 and the issue is still present. The bug is not in the reporting control, it is a VS2019 code generator bug. The code lacks the line that actually adds the control on the form:

this.Controls.Add(reportViewer1);

This needs to be placed after the control was initialized and before the

this.ResumeLayout(false);

line in the InitializeComponent() method, which can be found in the formName.Designer.cs

Menander answered 22/10, 2020 at 14:11 Comment(0)
P
4

I was having the same issue and I got it solved by installing those packages from NuGet:

1- Corrected.Microsoft.ReportServices.ReportViewerControl.Winforms

2- Microsoft.ReportingServices.ReportViewerControl.Winforms

3- Microsoft.ReportViewer.Common.v12

4- Microsoft.REportViewer.WinForms.v12

Rebuild your project and you are good to go.

** Found it on youtube but couldn't place the link here because of the rules here, thanks to him.

Psychological answered 4/2, 2021 at 8:12 Comment(1)
I had a working application that suddenly stopped working (gave Could not load file or assembly 'Microsoft.SqlServer.Types error). After trying several things, this was the only solution that worked for me. I am assuming a WIndows update killed something...Stroll
C
4

From VS 2019 click extension menu then select Manage Extensions at the online tab search report viewer you will find Microsoft RDLC Report Designer click download button right click on your project and select Manage Nuget Packages then install the report Viwer control to you project search for Microsoft.ReportingServices.ReportViewerControl.WebForms

  • rebuild Vs Solution
  • from Toolbox right click add Choose Items
  • on the .NET Framework Components, select Browse. Select the Microsoft.ReportViewer.WinForms.dll or Microsoft.ReportViewer.WebForms.dll from the NuGet package folder you installed The new control should display within the toolbox
Corydalis answered 11/3, 2021 at 19:53 Comment(0)
U
3

There are a ton of unofficial versions on NuGet. Ensure you are using the correct package:

https://www.nuget.org/packages/Microsoft.ReportingServices.ReportViewerControl.Winforms/

Issue was fixed in version 150.1400.0

Umlaut answered 18/12, 2019 at 23:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.