Cloud
Облачный сервис для быстрого и эффективного анализа и визуализации данных для вашего бизнеса без необходимости создания своих приложений и программирования.
[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);
}AllowCrossSiteJson — a custom action filter adding Access-Control-Allow-Origin: * so the Angular app can call the API.StiAngularViewer.ViewerDataResult/GetReportResult — the same Angular integration API, here on System.Web.Mvc.