Edit

PeriodToNum (period)

Result Type: Integer

Definition: Returns a period index. This is suitable for doing ageing calculations, and can also be used to iterate through report For loops.

Examples:  PeriodtoNum(CurrentPeriod) - PeriodtoNum(transaction.period)

returns 1 if transaction.period is equivalent to Jun:2006 and the current period is equivalent to Jul:2006; returns 2 if the current period is Aug:2006, and so on.

In a report For loop, the following:

Per ="1..." +periodtonum(currentper)

will step through each period. Within the loop you can then get the internal period number by NumToPeriod(Per).