Generate ASPNET CORE MVC reports

Asked

Viewed 1,013 times

1

Is there a solution to generate reports in ASPNET CORE 2.0 MVC applications without needing a reporting server? I did some searching and did not find much on the subject.

  • What kind of report? export to Excel, PDF.. etc?

  • Just as any application would, losing the visualization tools that Report Server already has, you would have to build it all...

  • What exactly is your doubt?

  • I am a beginner in WEB development, so I searched in the "CORE" version of aspnet does not have a native solution to generate reports. Can you give me a tutorial or some material? The idea is that the user can view a stock report, for example.

  • 1

    Possible duplicate of Reportviewer MVC Core

  • Can you generate PDF and open it in a tab? And it can be in javascript?

  • can yes, I’m just looking for a way to do that.

  • If your server is Linux or cannot store wkhtmltopdf executables, you can ulitzar Jsreport. https://jsreport.net/learn/dotnet-aspnetcore

Show 3 more comments

1 answer

0

You can use the Asp Net Core Rotary, in short, it converts the views into . cshtml for . pdf using wkhtmltopdf, very simple use, I use in all my applications.

Links:

https://www.nuget.org/packages/Rotativa.AspNetCore/1.1.1

https://github.com/webgio/Rotativa.AspNetCore

Example of Use

var relatorio = new ViewAsPdf("Print")
{
    PageOrientation = Rotativa.AspNetCore.Options.Orientation.Landscape,
    PageSize = Rotativa.AspNetCore.Options.Size.A4,
    PageMargins = { Left = 05, Right = 05 },
    Model = model
};
return relatorio;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.