The RepeatingRegion Class

The RepeatingRegion class represents a section of the document that can be reproduced more than once based on its matching constraints. At runtime an instance is created for each record in the input that is matched.

Methods

Name Description
getGlobalIndex()
Returns the global index of this repeating region in the document region starting at 0 for the first instance.
getLocalIndex()
Returns the local index of this repeating region in the parent region starting at 0 for the first instance.
getName()
Returns the name of the repeating region as it is displayed in the document view.

Usage

The functionality of the RepeatingRegion class is demonstrated in the sample report OrderList.4rp where every other row is displayed with a grey background. The below expression appears within the Background Color property of the box Data Row:
getRepeatingRegion().getGlobalIndex()%2==1?Color.fromRGBA(192,192,192,0):null

Example

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