A report's template is JSON, so you can modify its properties on the server before rendering.

Code overview. Load or create the report, resolve the target component or option, apply the requested properties, and render the updated result.
$reportJson = json_decode(file_get_contents('../reports/Variables.mrt'));
$reportJson->ReportAlias = 'Report Alias from Server-Side';
$reportJson->CalculationMode = 'Interpretation';
$reportJson->Dictionary->Variables->{'0'}->Value = 'Value from Server-Side';

$report->load($reportJson);
$report->render();


Because the template is plain JSON, you can decode it, change any property (here the alias, calculation mode and a variable), and load the modified object — a flexible way to adjust reports dynamically on the server.

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