Changing Dashboard Properties on the Server-Side
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.Dashboard properties can be changed on the PHP server by editing its JSON before loading it into the client.
Decode the JSON, change properties, load.
How it works. The template is edited as plain JSON on the server, so any property can be overridden before the dashboard reaches the browser.
Decode the JSON, change properties, load.
$reportJson = json_decode(file_get_contents('../reports/Christmas.mrt'));
$reportJson->ReportAlias = 'Dashboard Alias from Server-Side';
$reportJson->CalculationMode = 'Interpretation';
$report = new StiReport();
$report->load($reportJson);
$report->print();json_decode(file_get_contents(...))— read the dashboard template as a JSON object.$report->load($reportJson)— load the modified object; changed properties take effect on the client.
How it works. The template is edited as plain JSON on the server, so any property can be overridden before the dashboard reaches the browser.