Interactive Reporting uses a translator to distinguish between the range types used to substitute a column reference in a computed item expression. There are three types of ranges:
Continuous range corresponding to the whole column (for example, Units)
Aggregate range – this is a continuous range that is broken by Break Totals (for example Units_Agg). The only purpose of this range is as a data source for aggregate functions. The translator uses Units in all kind of expressions that refer to the column, but it uses Units_Agg range for aggregate functions, for example, SUM(Units_Agg).
The table below outlines how the JavaScript expression operations are mapped to Excel.
Table 2. JavaScript to Excel Mappings
The JavaScript’ ‘+’ operator can be applied to strings and denotes a string concatenation. Excel’s string concatenation operator is ‘&’. Interactive Reporting distinguishes between arithmetic ‘+’ and string ‘+’ by tracking the type of arguments in expressions. If one of the arguments is a string literal, a concatenation operator is used. The translator tracks the return type of Object Model functions and columns, so it can infer a final expression type. There are three supported types: numeric, string, and date.