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:
@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.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.