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.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.