Skip to content

Extending Your Reports

Custom JavaScript and Style Sheets

From the Manage Assets toolbar button on a report, custom JavaScript can be added that will execute when the report runs. Similarly, custom StyleSheets can be incorporated (these are deliberately limited to only affect the current report)

See Report Assets

Within custom JavaScript, it is possible to interact with the Report JavaScript API, or manipulate the current report to do something other than the default behavior eg loading in a 3rd party charting library and rending a new style of chart on the report that was not possible from Excel.

Avoiding Side Effects

One important caveat is to avoid writing JavaScript that could effect other reports or the CALUMO web page as a whole.

Any javascript code that uses global selectors (eg document.getElementById) can adversely affect the current report or anything on the page.

To avoid this, CALUMO provides a standard Report API JavaScript eg to find selectors on the page eg report.api.find('.a class') - this limits the selector to only the current report. The object report.api is automatically setup and can be used anywhere in custom JavaScript.

This section contains information about the Document Model and Events as well as a library of snippets your can use to manipulate your CALUMO Published Reports.