JSReportGenerator 1.0.5

Package Description

Install-Package JSReportGenerator -Version 1.0.5
dotnet add package JSReportGenerator --version 1.0.5
<PackageReference Include="JSReportGenerator" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JSReportGenerator --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: JSReportGenerator, 1.0.5"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install JSReportGenerator as a Cake Addin
#addin nuget:?package=JSReportGenerator&version=1.0.5

// Install JSReportGenerator as a Cake Tool
#tool nuget:?package=JSReportGenerator&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
        ---On Startup.cs ConfigureServices---
        services.AddSingleton<IJSReportServer, JSReportServer>();
        services.AddTransient<IJSReport, JSReport>();

        ---On Startup.cs Configure---
        ---Inject the IJSReportServer---
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, IJSReportServer ReportServer)
        ReportServer.Start();

        ---On ApiController---
        public IJSReportServer ReportServer { get; set; }
        public IJSReport report { get; set; }

        public TestController(IJSReportServer _ReportServer, IHostingEnvironment _env, IJSReport _Report)
        {
                    ReportServer = _ReportServer;
                    report = _Report;
                    env = _env;
        }

        [HttpGet]
        public string TestReport()
        {
                    var names = new List<Names>();
                    names.Add(new Names() { FirstName = "Aron", LastName = "Consuelo" });
                    names.Add(new Names() { FirstName = "Guian", LastName = "Salanguit" });
                    names.Add(new Names() { FirstName = "Rossu", LastName = "Belmonte" });

                    var pets = new List<Pets>();
                    pets.Add(new Pets() { Owner = "Rossu", Name = "Dog" });
                    pets.Add(new Pets() { Owner = "Rossu", Name = "Cat" });
                    pets.Add(new Pets() { Owner = "Aron", Name = "Sheep" });
                    pets.Add(new Pets() { Owner = "Guian", Name = "Cow" });

                    report.JSReportService = ReportServer.JSReportService;
                    report.ReportPath = Path.Combine(env.ContentRootPath, "templates");
                    var pdf = report.AddDataSource(names).AddSubReport("Pets", pets).GenerateReport("test", ReportRecipe.ChromePdf);
                    return pdf;
        }
        ---On Startup.cs ConfigureServices---
        services.AddSingleton<IJSReportServer, JSReportServer>();
        services.AddTransient<IJSReport, JSReport>();

        ---On Startup.cs Configure---
        ---Inject the IJSReportServer---
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, IJSReportServer ReportServer)
        ReportServer.Start();

        ---On ApiController---
        public IJSReportServer ReportServer { get; set; }
        public IJSReport report { get; set; }

        public TestController(IJSReportServer _ReportServer, IHostingEnvironment _env, IJSReport _Report)
        {
                    ReportServer = _ReportServer;
                    report = _Report;
                    env = _env;
        }

        [HttpGet]
        public string TestReport()
        {
                    var names = new List<Names>();
                    names.Add(new Names() { FirstName = "Aron", LastName = "Consuelo" });
                    names.Add(new Names() { FirstName = "Guian", LastName = "Salanguit" });
                    names.Add(new Names() { FirstName = "Rossu", LastName = "Belmonte" });

                    var pets = new List<Pets>();
                    pets.Add(new Pets() { Owner = "Rossu", Name = "Dog" });
                    pets.Add(new Pets() { Owner = "Rossu", Name = "Cat" });
                    pets.Add(new Pets() { Owner = "Aron", Name = "Sheep" });
                    pets.Add(new Pets() { Owner = "Guian", Name = "Cow" });

                    report.JSReportService = ReportServer.JSReportService;
                    report.ReportPath = Path.Combine(env.ContentRootPath, "templates");
                    var pdf = report.AddDataSource(names).AddSubReport("Pets", pets).GenerateReport("test", ReportRecipe.ChromePdf);
                    return pdf;
        }

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.5 347 2/26/2020
1.0.4 246 2/26/2020
1.0.3 169 2/26/2020
1.0.2 180 2/26/2020
1.0.1 179 2/26/2020
1.0.0 204 2/26/2020