top of page

2015 =link= — Reportviewer

<dependentAssembly> <assemblyIdentity name="Microsoft.ReportViewer.Common" publicKeyToken="89845dcd8080cc91" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Microsoft.ReportViewer.WinForms" publicKeyToken="89845dcd8080cc91" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /> </dependentAssembly> Here is a minimal WinForms example that loads an RDLC file and renders it to PDF without showing the UI.

Note: There is no native .NET Core version for ReportViewer 2015. This is strictly .NET Framework 4.5.2+. Method 1: NuGet (Recommended) Open your Package Manager Console and run: reportviewer 2015

using Microsoft.Reporting.WinForms; using System.IO; using System.Data; public byte[] RenderReport(string reportPath, DataTable data) public byte[] RenderReport(string reportPath

var report = new LocalReport(); report.ReportPath = reportPath; report.DataSources.Add(new ReportDataSource("DataSet1", data)); report.ReportPath = reportPath

bottom of page