The Dashboards.PHP viewer is created on the server with the PHP SDK, which emits the JavaScript viewer into the page. A dashboard is just a report loaded from a .mrt file.

Create the viewer, load the dashboard.
$viewer = new StiViewer();
$viewer->javascript->relativePath = '../';
$viewer->process();

$report = new StiReport();
$report->loadFile('../reports/Christmas.mrt');
$viewer->report = $report;

$viewer->printHtml();

How it works. PHP configures and wires the viewer, but the dashboard renders client-side, so the same page both serves the viewer and answers its requests.

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.