I've written a formula as follows
whileprintingrecords;
shared numbervar level1;
level1:=level1+1;
ToText(level1,0);
And placed it into a report as so:
Report Header a | {formula} {Text:Introduction}
Report Header b | {formula} {Text: Scope}
Report Header c | {formula} {Text: Overview}
Group Header a | {formula} {Group Header text}
The print result is
1 Introduction
1 Scope
1 Overview
2 Group Header text
I would expect to see
1 Introduction
2 Scope
3 Overview
4 Group Header text
It seems the formula is being evaluated once for the entire Report Header sections and the single result is being printed everyone the formula is placed. Is there any way to force evaluation of the formula each time it appears in the report, and not rely on some cached value?
Of course, alternative implementation suggestions welcomed too.
Thanks in advance,
Shamrock