For legacy desktop applications running on .NET Framework 4.6+, the official package is . WebForms (.NET Framework)
Click the icon in the toolbar (floppy disk icon) to save as PDF or Excel.
The history of the Report Viewer is marked by a significant transition in how it is distributed and updated.
The application must fetch data first and pass it to the control. Server-side (highly scalable for massive datasets). Client-side (consumes local application memory). Expressions Supports full SSRS expressions and complex assemblies. microsoft report viewer
Provides a sidebar outline for users to navigate large documents quickly.
| Problem | Likely Cause | Solution | |---------|--------------|----------| | "A data source instance has not been supplied" | Forgot to add ReportDataSource | Verify DataSources.Clear() and Add() before RefreshReport() . | | Report Viewer is blank/empty | Incorrect report path | Use absolute or Application.StartupPath + @"\Reports\file.rdlc" . | | PDF export cuts off columns | Page width mismatch | In RDLC designer, set Report Properties → Page Size → Width to 11in (Landscape). | | Could not load file or assembly 'Microsoft.ReportViewer.Common' | Missing NuGet or broken reference | Reinstall the package. Check bin folder for the DLL. | | WinForms control freezes on large data | Synchronous rendering | Use reportViewer.SetDisplayMode(DisplayMode.PrintLayout) and call RefreshReportAsync() . | | Parameter dropdowns don't filter correctly | Missing @ParameterName in dataset query | Ensure query uses WHERE Column = @ParameterName . | | Subreport not showing data | Subreport processing event not wired | Hook event before calling RefreshReport . | | Printing from WinForms fails | Print dialog hidden behind modal | Use reportViewer.PrintDialog() on a separate thread with BeginInvoke . | | ASP.NET: Unable to load embedded resource | Missing WebForm ScriptManager | Add <asp:ScriptManager ID="sm1" runat="server" /> . | | .NET 6: TypeLoadException | Mixed Framework targeting | Use Microsoft.Reporting.WinForms (not legacy package). |
Reached End of Support on October 14, 2025 . No new security fixes will be provided for this version. For legacy desktop applications running on
If you are starting a greenfield project or completely rewriting a legacy app, relying on Microsoft Report Viewer may introduce technical debt. Consider these industry-standard alternatives: Alternative Cloud-native, highly visual applications
Update your web.config file to register the handler within the section:
Use code with caution. 3. .NET Core / .NET 6+ Compatibility Issues The application must fetch data first and pass
Conversely, using the Report Viewer for modern public-facing web apps is an anti-pattern. It is heavy, not mobile-responsive, and inaccessible (screen readers struggle with its generated HTML). For dashboards, real-time data, or interactive exploration, Power BI or custom HTML/JS grids are vastly superior.
reportViewer1.LocalReport.SetBasePermissionsForSandboxAppDomain(new System.Security.PermissionSet(System.Security.Permissions.PermissionState.Unrestricted)); Use code with caution.
Migration Tip: Export existing RDLC reports to HTML using LocalReport.Render("HTML") and reverse-engineer the markup.
// 1. Create and fill data source var dt = new DataTable(); dt.Columns.Add("ProductName"); dt.Columns.Add("UnitPrice"); dt.Rows.Add("Laptop", 1200); dt.Rows.Add("Mouse", 25);