Handle onOpenedReport in the PHP viewer to modify a report before it reaches the browser.

Viewer setup. Configure the viewer, load the report, assign it to the component, and process the requests or events raised by the UI.
$viewer->onOpenedReport = function (StiReportEventArgs $args) {
    $args->report->ReportAlias = 'Report Alias from Server-Side';
    $reportJsonString = file_get_contents('../reports/SimpleList.mrt');
    $args->setReportJson($reportJsonString);
};
$viewer->process();


The event lets you inspect and replace the report on the server — here it changes a property and swaps in a different template — before the viewer displays it to the user.

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