The Angular dashboard viewer can also be hosted by a classic ASP.NET MVC (.NET Framework) application, with a controller that allows cross-origin requests.

Serve the viewer with CORS enabled.
[AllowCrossSiteJson]
public ActionResult InitViewer()
{
    var requestParams = StiMvcViewer.GetRequestParams();
    var options = new StiAngularViewerOptions();
    options.Actions.GetReport = "GetReport";
    options.Actions.ViewerEvent = "ViewerEvent";
    options.Toolbar.ShowDesignButton = true;
    return StiAngularViewer.ViewerDataResult(requestParams, options);
}

[AllowCrossSiteJson]
public ActionResult GetReport()
{
    var report = StiReport.CreateNewReport();
    report.Load(Server.MapPath("~/Reports/HotelRevenue.mrt"));
    return StiAngularViewer.GetReportResult(report);
}

How it works. A .NET Framework MVC controller answers the Angular viewer's cross-origin requests, so legacy apps can serve modern Angular dashboards.

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.