Printing and Emailing PDF Reports From InterSystems Data Platform
Printing and Emailing
InterSystems DeepSee reports
Evgeny Shvarov, Community Manager
• To print DeepSee dashboards interactively
• The reports should be printed in paper (A4)
• To send the reports in form of DeepSee dashboards
• E.g. with attached PDF
• Take InterSystems Data Platform!
• Install DeepSee Web (DSW)
• Web player for DeepSee Dashboards
• Angular 1.5 application
• JSON transport
• Also Install DSW Reports
• Have the feature to make reports and send it in PDF
How it works?
• Every widget in DSW can be shared as iframe
• Make a standalone web page with a set of iframes
• Run reports programmatically via DSW.Report.Task class
• “report” folder should be placed under in /dsw web app.
How it works?
How to Cook a Report?
• Take the widget you like
• With filters you want
• Copy the “Share code”
• Paste into report.html
• Tweak the title, width, totals if needed
• Put whatever number of widgets you want
• Run the report from /dsw/reports/yourreport/index.html
Let’s send the report via email
• Generate email via phantom.js
• Send email with attached PDF with ObjectScript
• Run the report programmatically on Schedule
• Phantom.js is a headless browser: phantomjs.org
• allows execute a page in a backend on the server and generate
a pdf from it
• You need to install Phantom.js on your server to let it done
• You need to use a rasterise.js
How to Deploy the Solution?
• You need DSW installed on a target server
• Deploy js and html files into target server under /dsw/reports
• To run a report call
• Do ##class(DSW.Report.Task).(”url”,”Reportname”)
• Security: security is the same as you have for /dsw web-app
DSW for Dashboards
Iframes for widgets
Phantom.js as headless browser to generate pdf in background
https://github.com/intersystems-ru/DeepSeeWeb - DeepSee web
github.com/intersystems-community/dsw-reports – solution
github.com/intersystems-community/dc-analytics - example
community.intersystems.com - discuss and improve!!