The viewer can be driven from your application through a properties object — for instance to switch which dashboard is shown at run time.

Read the properties and load the chosen dashboard.
public IActionResult GetReport()
{
    var reportName = "HotelRevenue.mrt";

    var httpContext = new Stimulsoft.System.Web.HttpContext(this.HttpContext);
    var properties = httpContext.Request.Params["properties"]?.ToString();
    if (properties != null)
    {
        // parse the JSON properties passed from Angular to pick the dashboard
    }

    var report = StiReport.CreateNewReport();
    report.Load(StiAngularHelper.MapPath(this, $"Reports/{reportName}"));
    return StiAngularViewer.GetReportResult(this, report);
}

How it works. The Angular component passes properties with each request, so the controller can vary the dashboard it returns without new endpoints.

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