When the user exports a dashboard, the result can be sent back to the server and saved, through the onEndExportReport event.

Save the exported bytes in the event.
$viewer->onEndExportReport = function (StiExportEventArgs $args) {
    $reportName = $args->fileName . '.' . $args->fileExtension;
    $reportPath = "../reports/$reportName";
    file_put_contents($reportPath, base64_decode($args->data));

    return StiResult::getSuccess("Saved to '$reportPath'.");
};

$viewer->handler->process();

How it works. The export travels from the client viewer to the PHP event, so exported dashboards can be archived on the server automatically.

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