Editing a Report Template in the Designer
Our sample projects and report templates can help you learn the basics of working with our products.The Reports.PHP designer runs in the browser, served by the PHP SDK. This example opens the designer with a template loaded for editing.
Designer setup. Configure the designer, load the report template, process its callbacks, and connect the save action to the application.
Designer setup. Configure the designer, load the report template, process its callbacks, and connect the save action to the application.
$designer = new StiDesigner();
$designer->javascript->relativePath = '../';
$designer->process();
$report = new StiReport();
$report->loadFile('../reports/SimpleList.mrt');
$designer->report = $report;
$designer->printHtml();new StiDesigner()— creates the server-side designer object that emits the client-side designer.process()— handles the designer's server requests (data, save, preview).designer->report— loads a report into the designer to open it for editing.printHtml()— outputs the complete designer to the page.
process() handles the designer's server requests, and printHtml() outputs the complete designer. Loading a report into designer->report opens it for editing — the full designer runs client-side.