When you host the web designer you usually want to control where edited templates are stored.

Enabling save. Register a SaveReport action in the designer options:
@Html.StiNetCoreDesigner(new StiNetCoreDesignerOptions()
{
    Actions =
    {
        GetReport = "GetReport",
        SaveReport = "SaveReport",
        DesignerEvent = "DesignerEvent"
    }
})

Handling the save. In the action you receive the edited report and the file name from the Save dialog, and store the template yourself — here it is serialized to a JSON string:
public IActionResult GetReport()
{
    var report = new StiReport();
    report.Load(StiNetCoreHelper.MapPath(this, "Reports/TwoSimpleLists.mrt"));

    return StiNetCoreDesigner.GetReportResult(this, report);
}

public IActionResult SaveReport()
{
    var requestParams = StiNetCoreDesigner.GetRequestParams(this);
    var report = StiNetCoreDesigner.GetReportObject(this);

    // Save the report template, for example to a JSON string
    var json = report.SaveToJsonString();

    var name1 = report.ReportName;               // Original report name
    var name2 = requestParams.Designer.FileName; // Name from the Save dialog

    return Content($"{{\"infoMessage\":\"Report file saved successfully as {name2}\"}}");
}

Because you get the report object and the requested name, the template can be written to a database, a cloud store or the file system — the designer only needs a confirmation message in return.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.