Stimulsoft for Angular includes a report designer alongside the viewer; this controller serves it and handles its Get and Save actions.

Route designer actions.
[HttpPost]
public IActionResult Post()
{
    var requestParams = StiAngularDesigner.GetRequestParams(this);
    if (requestParams.ComponentType == StiComponentType.Designer)
        switch (requestParams.Action)
        {
            case StiAction.GetReport:  return GetReport();
            case StiAction.SaveReport: return SaveReport();
        }
    return StiAngularDesigner.ProcessRequestResult(this);
}
Get and save the report.
public IActionResult GetReport()
{
    var report = StiReport.CreateNewReport();
    report.Load(StiAngularHelper.MapPath(this, "Reports/SimpleList.mrt"));
    return StiAngularDesigner.GetReportResult(this, report);
}

public IActionResult SaveReport()
{
    var report = StiAngularDesigner.GetReportObject(this);
    report.Save(StiAngularHelper.MapPath(this, "Reports/SimpleList.mrt"));
    return StiAngularDesigner.SaveReportResult(this);
}

How it works. The designer's events are dispatched through the controller, so opening and saving a report are handled on the server.

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.