When you build the page with your own HTML template, the viewer's scripts and body can be emitted separately so they fit your layout.

Emit the JS and HTML parts into a template.
viewer = StiViewer()
viewer.options.width = '1000px'
viewer.options.height = '600px'

if viewer.processRequest(request):
    return viewer.getFrameworkResponse()

report = StiReport()
report.loadFile(url_for('static', filename='reports/SimpleList.mrt'))
viewer.report = report

js = viewer.javascript.getHtml()
html = viewer.getHtml()
return render_template('...html', viewerJavaScript=js, viewerHtml=html)

How it works. The component is split into script and body, letting you place the viewer anywhere inside your own Jinja template.

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.