The onOpenedReport event lets you modify a dashboard — or swap it entirely — on the PHP server before the viewer displays it.

Change the dashboard in the event.
$viewer->onOpenedReport = function (StiReportEventArgs $args) {
    $args->report->ReportAlias = 'Dashboard Alias from Server-Side';

    $reportJson = file_get_contents('../reports/Christmas.mrt');
    $args->setReportJson($reportJson);
};

$viewer->process();
$report->loadFile('../reports/SalesOverview.mrt');
$viewer->report = $report;

How it works. The dashboard can be adjusted server-side per request, so the same view can tailor or substitute the document before display.

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