Is it possible to render .rdlc
reports with ASP.NET Core? Currently this only seems to be possible if I target the .NET Framework as opposed to .NET Core.
I don't need a report viewer I just need to render the results of an .rdlc
report as a byte array.
In case anyone is still looking for a similar solution, I would recommend using "ReportViewerCore.NETCore".
Here is the nuGet reference - https://www.nuget.org/packages/ReportViewerCore.NETCore/
Here is the github link to the repo - https://github.com/lkosson/reportviewercore/
Basic usage
Stream reportDefinition; // your RDLC from file or resource
IEnumerable dataSource; // your datasource for the report
LocalReport report = new LocalReport();
report.LoadReportDefinition(reportDefinition);
report.DataSources.Add(new ReportDataSource("source", dataSource));
report.SetParameters(new[] { new ReportParameter("Parameter1", "Parameter value") });
byte[] pdf = report.Render("PDF");
If you want to create pdf/excel/word using rdlc report I recommend you can use AspNetCore.Reporting library. This is open source and comes as a nuget package. you can integrate this in your .NET Core API or .NET Core Azure function. You can generate a byte array convert it to base 64 string and retrieve that to your client side. More on the link in the comment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With