Doesn't run. This commit is just to backup the changes.
Note that the interface for the custom JS code inside a report template has changed. It now offers promise-based interface and exposes knex.
Execution of reports is TBD