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.

Hallo! Brauchen Sie Hilfe?