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

Yorelis
  • 75
  • 1
  • 1
  • 5
  • MS Are aware of this bug it seems. See the dev community post [here](https://developercommunity.visualstudio.com/comments/620820/view.html) which gives a (hopefully temporary) solution. – Ants1060 Aug 07 '19 at 17:01
  • 2
    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. – Yorelis Aug 08 '19 at 13:04
  • Interesting. That's slightly less of a downgrade the than one in the link I gave. I'll give it a go later. – Ants1060 Aug 08 '19 at 21:48
  • @Yorelis thank you , version 150.900. works for me (vs 2019) – Sharif Lotfi Mar 21 '21 at 06:10

4 Answers4

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

Yuriy S
  • 131
  • 4
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.

  • 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... – Mifo Mar 29 '22 at 15:19
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
developernader
  • 105
  • 1
  • 4
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

HackSlash
  • 4,944
  • 2
  • 18
  • 44