When the user saves in the designer, the edited template is sent to the server; the onSaveReport event decides where to store it.

Persist the template in PHP.
$designer = new StiDesigner();
$designer->javascript->relativePath = '../';

$designer->onSaveReport = function (StiReportEventArgs $args) {
    $name = strlen($args->fileName) > 0 ? $args->fileName : 'Report.mrt';
    $result = file_put_contents("../reports/$name", $args->getReportJson());

    return $result === false
        ? StiResult::getError('Save failed.')
        : StiResult::getSuccess("Saved to '$name'.");
};

$designer->process();
$designer->report = $report;

How it works. The designer round-trips the template through the PHP event, so user edits are stored wherever your application chooses.

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