A report can be rendered from Python code and reacted to when rendering completes, via the onAfterRender event.

Load, render, and handle completion.
report = StiReport()
report.onAfterRender += 'afterRender'

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

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

js = report.javascript.getHtml()
html = report.getHtml()
return render_template('...html', reportJavaScript=js, reportHtml=html)

How it works. Python only generates the engine code; the report is built in the browser, and the event signals when it is ready.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.