Editing a Report Template in the Designer using JavaScript
Our sample projects and report templates can help you learn the basics of working with our products.The designer, like the viewer, can be created in client JavaScript with PHP serving only as the
Process requests in PHP.
How it works. Users edit the template in the browser; the PHP handler is reached only for data, so the designer stays a client-side component.
StiHandler request handler.Process requests in PHP.
$handler = new StiHandler();
$handler->process();Build the designer in JavaScript.let options = new Stimulsoft.Designer.StiDesignerOptions();
options.appearance.fullScreenMode = true;
let designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
designer.onBeginProcessData = (args, callback) => Stimulsoft.handler.process(args, callback);
let report = new Stimulsoft.Report.StiReport();
report.loadFile("../reports/SimpleList.mrt");
designer.report = report;
designer.renderHtml("designerContent");StiDesigner(options, id, false)— the client designer;renderHtml(id)places it in the page.onBeginProcessData→Stimulsoft.handler.process— routes data requests to the PHP handler.
How it works. Users edit the template in the browser; the PHP handler is reached only for data, so the designer stays a client-side component.