Editing a Report Template in the Designer in an HTML template
Our sample projects and report templates can help you learn the basics of working with our products.The designer's scripts and body can be emitted separately to fit your own HTML template, just like the viewer.
Emit the JS and HTML parts into a template.
How it works. Splitting the component into script and body lets you place the full designer inside a custom Jinja template.
Emit the JS and HTML parts into a template.
designer = StiDesigner()
if designer.processRequest(request):
return designer.getFrameworkResponse()
report = StiReport()
report.loadFile(url_for('static', filename='reports/SimpleList.mrt'))
designer.report = report
js = designer.javascript.getHtml()
html = designer.getHtml()
return render_template('...html', designerJavaScript=js, designerHtml=html)designer.javascript.getHtml()+designer.getHtml()— the designer's script block and visual HTML.- Pass both to
render_templateto embed the designer in your own page layout.
How it works. Splitting the component into script and body lets you place the full designer inside a custom Jinja template.