Problem
You’re trying to use the ReportViewer control in Visual Studio but it’s not in the toolbox.
Other symptoms:
- After manually adding the ReportViewer control to the toolbox clicking Design a new report does nothing.
- The RDLC report designer does not open and opening the RDLC file just opens the report markup.
Solution
Note: Tested in Visual Studio 2017 and Visual Studio 2019. The exact instructions may have slightly different steps depending on which version of VS you’re using.
There are two different problems to solve. First, you need to get the ReportViewer control. Second, if you want to be able to add local reports (.RDLC) and edit them using the report designer, then you’ll need to add the RDLC Report Designer extension.
Step 1 – Get the ReportViewer control
After this step, you’ll be able to see the ReportViewer control in the Visual Studio toolbox.
You can get the ReportViewer control by installing the appropriate nuget package.
If you’re using .NET Core
At this time, there doesn’t seem to be an official ReportViewer nuget package from Microsoft. Instead, you can use the ReportViewerCore.WinForms nuget package.
- Install the ReportViewer nuget package (View > Other Windows > Package Manager Console).
Install-Package ReportViewerCore.WinForms
Code language: PowerShell (powershell)
- Open a Windows Form.
- Drag and drop the ReportViewer control from Toolbox > Microsoft.ReportViewer.WinForms > ReportViewer.
If you’re using .NET Framework
- Install the ReportViewer nuget package (View > Other Windows > Package Manager Console).
#For WinForms
Install-Package Microsoft.ReportingServices.ReportViewerControl.WinForms
#For WebForms
Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms
Code language: PowerShell (powershell)
After installing the nuget package, the ReportViewer control should now be in the toolbox (View > Toolbox > Microsoft SQL Server > ReportViewer).
If you don’t see it, you can add it manually with the steps below:
- Open Visual Studio.
- Click View > Toolbox.
- Right-click in the toolbox > Choose Items.
- In the .NET Framework Components tab, click Browse…
- Navigate to your solution’s nuget /packages/ directory and select the Microsoft.Reporting.WinForms.dll (or WebForms.dll):
- Verify the ReportViewer control is checked in the Toolbox items, then click OK.
Now you’ll be able to see the ReportViewer control in the toolbox and can drag it to a form.
Step 2 – Get RDLC Report Designer extension
To be able to add local report files (.RDLC) to your project and design them visually with the Report Designer, you’ll have to add the RDLC Report Designer extension.
- Open Visual Studio
- Click Extensions > Manage Extensions > Online.
- Search for RDLC Report Designer
- Select Microsoft RDLC Report Designer from the list and click Download (Note: This may say Install if it’s already been downloaded at some point).
- After it’s done downloading/installing, you’ll see a notification that says Your changes will be scheduled. The modifications will begin when all Microsoft Visual Studio windows are closed.
- Close Visual Studio.
- You should now see the VSIX Installer initializing.
- On the VSIX Installer prompt, click Modify.
- Wait for it to finish installing, then close the VSIX Installer window.
Now you can add a local report to your project (Add New Item > Report) and design it visually:
Comments are closed.