Showing Interactive Reports
Our sample projects and report templates can help you learn the basics of working with our products.Stimulsoft reports can be interactive — sorting, drill-down, collapsing groups, chart interaction — and it all works in the web viewer out of the box.
The viewer. The view uses the standard viewer helper; the interaction is defined inside the report templates themselves:
Selecting the report. The
Dynamic sorting, drill-down, collapsing and interactive charts are configured on the components at design time; the viewer then handles the user's clicks automatically, requesting new data through the same
The viewer. The view uses the standard viewer helper; the interaction is defined inside the report templates themselves:
@Html.StiNetCoreViewer(new StiNetCoreViewerOptions()
{
Actions = { GetReport = "GetReport", ViewerEvent = "ViewerEvent" }
})Selecting the report. The
GetReport action loads a different interactive template depending on the requested id:public IActionResult GetReport(int id = 1)
{
var report = new StiReport();
switch (id)
{
case 1: report.Load(StiNetCoreHelper.MapPath(this, "Reports/Sorting.mrt")); break;
case 2: report.Load(StiNetCoreHelper.MapPath(this, "Reports/ListOfProducts.mrt")); break;
case 3: report.Load(StiNetCoreHelper.MapPath(this, "Reports/GroupWithCollapsing.mrt")); break;
case 5: report.Load(StiNetCoreHelper.MapPath(this, "Reports/InteractiveCharts.mrt")); break;
}
return StiNetCoreViewer.GetReportResult(this, report);
}Dynamic sorting, drill-down, collapsing and interactive charts are configured on the components at design time; the viewer then handles the user's clicks automatically, requesting new data through the same
ViewerEvent action when needed.