When the user exports a report in the viewer, the generated file can be sent back to the server and saved — handled in the onEndExportReport event.

Save the exported file in PHP.
$viewer = new StiViewer();
$viewer->javascript->relativePath = '../';

$viewer->onEndExportReport = function (StiExportEventArgs $args) {
    $reportName = $args->fileName . '.' . $args->fileExtension;
    file_put_contents("../reports/$reportName", base64_decode($args->data));

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

$viewer->handler->process();
$viewer->report = $report;

How it works. The export travels from the client viewer to the PHP event, so exported files can be archived on the server automatically.
На скриншоте ниже Вы можете увидеть результат выполнения данного кода:

Sending an Exported Report to the Server-Side