With the Node.js engine, a dashboard can be rendered and exported entirely on the server — no browser involved. The result comes back as byte data.

Render and export via the Node.js engine.
report = StiReport()
report.engine = StiEngineType.SERVER_NODE_JS

report.loadFile(current_app.static_folder + '/reports/WebsiteAnalytics.mrt')
result = report.render()

if result:
    buffer = report.exportDocument(StiExportFormat.HTML)
    # or save to a file:
    # report.exportDocument(StiExportFormat.PDF, filePath)
else:
    message = report.nodejs.error

How it works. Node.js runs the engine server-side, so the export completes without a client, ideal for scheduled or headless generation.

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.