namespace ArcheoLamia.Reports.Pages { using Microsoft.AspNetCore.Mvc; using Stimulsoft.Report; using Stimulsoft.Report.Mvc; public class DesignerController : Controller { static DesignerController() { // How to Activate //Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnO..."; //Stimulsoft.Base.StiLicense.LoadFromFile("license.key"); //Stimulsoft.Base.StiLicense.LoadFromStream(stream); } public IActionResult Index() { return View("~/Modules/Reports/Designer/DesignerIndex.cshtml"); } public IActionResult GetReport(string id) { StiReport report = new StiReport(); report.Load(StiNetCoreHelper.MapPath(this, $"Modules/Reports/{id}.mrt")); return StiNetCoreDesigner.GetReportResult(this, report); } public IActionResult PreviewReport() { StiReport report = StiNetCoreDesigner.GetActionReportObject(this); return StiNetCoreDesigner.PreviewReportResult(this, report); } public IActionResult SaveReport() { StiReport report = StiNetCoreDesigner.GetReportObject(this); report.Save(report.ReportFile); return StiNetCoreDesigner.SaveReportResult(this); } public IActionResult SaveReportAs() { return StiNetCoreDesigner.SaveReportResult(this); } public IActionResult DesignerEvent() { return StiNetCoreDesigner.DesignerEventResult(this); } } }