Skip to content

Report JavaScript API

It is possible to customize CALUMO reports by writing your own Javascript and combining it with a report as a Javascript Asset (see Extending Your Reports with Javascript)

In addition, CALUMO has a set of Javascript functions (API) for you to to more easily manage report-specific functions.

The Report Javascript API allows you to, for example, writeback a particular cell or return all selected members on the report.

The following code example will wait for the current report to calculate the first time, and then use the API to call back to the server and calculate a different report and retrieve data from it (without rendering that different report).

report.api.bind("postrender", function(){
    // Call off to the server via the API to calculate a report
    var calcId = report.api.getCalculationId("Report2");

    // Use the id of that calculation and get cells A1:F40 from it as an array of values
    var values = report.api.getValues("A1:F40", calcId);

    // At this point we have an array of values
    // We could do many things with them, such as
    //   * Feed them into a JavaScript charting library
    //   * Update some data on this report 
    //   * Display the data in some way on this report.

The following API and events are available:

Back to top