Working with onDesign and onExit events
Our sample projects and report templates can help you learn the basics of working with our products.The viewer and designer can be combined into one edit-and-preview workflow using the viewer's
Viewer route: enable the Design button.
How it works. Two routes and a pair of events link preview and editing, so users move between viewer and designer within one workflow.
onDesignReport and the designer's onExit events, served from two routes.Viewer route: enable the Design button.
viewer = StiViewer()
viewer.onDesignReport += 'viewerDesign'
viewer.options.toolbar.showDesignButton = TrueDesigner route: handle Exit and Save.designer = StiDesigner()
designer.onExit += 'designerExit'
designer.onSaveReport += saveReport
designer.options.toolbar.showFileMenuExit = TrueonDesignReport→ a JS handler that navigates to the designer route.onExit→ a JS handler that navigates back to the viewer route;onSaveReportpersists edits.
How it works. Two routes and a pair of events link preview and editing, so users move between viewer and designer within one workflow.