Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use microsoft reporting services with .net core

I'm interested in using reporting services in my vue.js .net core project. I don't need the reportviewer control, just to execute the appropriate code to process it remotely to return as a bytestream into a .pdf.
I have my previous code I used with the microsoft.reporting.webforms namespace in an ASP.net MVC / angularjs project to do the same thing, but the webforms implementation will no longer work with the .net core pipeline.

Does anyone know how to call an SSRS report remotely using .net core 1.1? In .net 4.x this was done via ReportViewer.ServerReport.Render("PDF", etc...)

thanks.

like image 643
Morgan Avatar asked Oct 14 '17 14:10

Morgan


Video Answer


1 Answers

SSRS offers a report execution web service that allows developers to do exactly what you're trying to do. In fact, the ReportViewer control that you were previously using is most likely using this web service behind the scenes. This means that it is still possible to render a report remotely, but this time instead of doing it through the report viewer control (which does not work with .NET Core), you will do it by accessing the web service directly.

You will want to take a look at the documentation regarding this web service here. Specifically, you will want to look at the Render and Render2 methods which will render the report and return it back to you in a byte[].

like image 181
darrunategui Avatar answered Sep 23 '22 19:09

darrunategui