getCalculationId

This function allows you to call to another report, calculate it in the background without rendering it to the user and return an id for that calculation result that can be used by the other api to get data from that calculation result.

Syntax

getCalculationId (reportname, queryString, isPrivate, publisher)

Arguments

reportName

(Required)

The name of the report which you want to perform a background calculation on

queryString

Any additional query string arguments you want to pass in for the calculation of the report

Default value: ”“

isPrivate

Is this a private report

Default value: false

publisher

If it is a private report, specify the login id of the user that published it.

Default value: ”“

Return

The result of this function is numeric value representing the calculation id.

Example

The following code will call back to the server and calculate the named report and then retrieve data from it, without ever rendering that report.

//
// Example 1 - Calculate the named public report.
//
var calcId1 = report.api.getCalculationId("MyTestReport");

//
// Example 2 - Calculate the named private report
//
var calcId2 = report.api.getCalculationId("MyTestReport", "", true, "sgibbs");

//
// Example 3 - Calculate a public report with additional parameters
//
var queryString = "[Date].[Date].%26[2]&R1C3=Yesterday"
var calcId3 = report.api.getCalculationId("MyTestReport", queryString);