Showing a Dashboard in the Viewer
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.The Stimulsoft web viewer displays interactive dashboards in ASP.NET Core MVC just as it displays reports.
Adding the viewer to a view. Use the
Serving the dashboard from the controller. Create a dashboard with
How it works. A dashboard is a
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:

Adding the viewer to a view. Use the
@Html.StiNetCoreViewer helper with the actions the viewer should call:@using Stimulsoft.Report.Mvc;
@Html.StiNetCoreViewer(new StiNetCoreViewerOptions()
{
Actions =
{
GetReport = "GetReport",
ViewerEvent = "ViewerEvent"
}
})Serving the dashboard from the controller. Create a dashboard with
CreateNewDashboard(), load an .mrt, and return it:public IActionResult GetReport()
{
var report = StiReport.CreateNewDashboard();
report.Load(StiNetCoreHelper.MapPath(this, "Dashboards/DashboardChristmas.mrt"));
return StiNetCoreViewer.GetReportResult(this, report);
}
public IActionResult ViewerEvent()
{
return StiNetCoreViewer.ViewerEventResult(this);
}How it works. A dashboard is a
StiReport created with CreateNewDashboard(). The viewer requests it through GetReport, and the interactive dashboard — charts, tables, gauges and filters — is rendered in the browser, with every interaction routed back to the controller.На скриншоте ниже Вы можете увидеть результат выполнения данного кода:
