Expressing the Range Argument

The Range argument refers to view-time expanded rows and columns, on which calculations are performed after suppression. Sorting is performed after calculation is completed.

Table -2 Range Notation

Type Notation Description Example
None   The Range argument is optional. Point to all expanded rows in row segment 2.

row[2]

Single Range [segment (range)] Single expanded row or column Point to expanded row 5 in segment 2:

row[2(5)]

Consecutive Range Reference [:] Range of expanded rows or columns Point to expanded rows 5,6,7,8,9,10 in row segment 2:

row[2(5:10)]

Nonconsecutive Range references [,] Multiple single expanded rows or columns Point to expanded rows 5, 7, 8 and 10 in row segment 2:

row[2(5,7,8,10)]

If a range is used, you can use any combination of the range notations in Table -2.

Example 1:

Point to expanded rows 5 through 10 in design-time row 2:

row[2(5:10)]

If row segment 2 expands to 15 rows, the function operates on only expanded rows 5 through 10.

Example 2:

Identify columns C through E in design-time column A:

column[A(C:E)]

Example 3:

Point to expanded rows 1, 3, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15 and 17 in design-time row 2:

row[2(1,3, 5:10, 12:15, 17)] 

When the grid contains suppression properties, expanded rows and columns may be suppressed. If the Range argument refers to a number of expanded rows that is greater than the maximum number of rows expanded in the segment, the extra rows are ignored.

Example 4:

In the following example, expanded rows 6 through 10 are identified, but segment 1 contains only 3 expanded rows. In this situation, the function works only on expanded rows 6 through 8:

row[1(6:10)]

If none of the expanded rows in the Range exist, the entire axis reference is ignored.

Example 5:

Ignore the reference to 23 if segment 3 only contains 10 expanded rows:

row[3(23)]

Example 6:

If you enter a larger starting range than ending range, the system internally switches them around. The following shows how the range is reversed:

row[1(7:5)] becomes row[1(5:7)]

Multiple references to the same expanded rows or columns are valid. However, this may cause the same rows or columns to be included twice in an expression.

Example 7:

Sum expanded row 5 twice:

row[2(3,5,7,5)].sum 

Example 8:

Specify expanded rows 3, 4, 5, 6, 7, and row 5. Include row 5 twice in the calculation of the average:

row[2(3:7,5)].ave