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.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.