The Context Class

Any RTL expression is executed as a member function of this class so that this class represents the 'this' reference of the RTL expression.

Methods

Modifier and Type Method Description
The RepeatingRegion Class
getAncestorRepeatingRegion​(java.lang.String name)
Returns the ancestor repeating region by name from fragments containing this expression in the document.
The RepeatingRegion Class
getRepeatingRegion()
Returns the repeating region by name from fragments containing this expression in the document.

Usage

With RTL classes, it is not possible to create and subclass objects. The new keyword is not supported.

Example

In the following example, this expression can be added to the Background Color property of the box Data Row in the sample report OrderList.4rp. This causes the alternating rows to be either red or green. An instance representing the enclosing repeating region is obtained by calling the method getRepeatingRegion() of the current context:

getRepeatingRegion().getGlobalIndex()%2==0?Color.GREEN:Color.RED