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.

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.