I have a very complex report on fastreport on a given page the structure is a MasterData - > DetailData and within this Detail you have the required components, everything works 100%, it happens that in a fxtMemo I need to put the number of the worksheet this will number in sequence each Detail sheet.
I did the following, in the code I created a global variable ContaPlanilha: integer = 0;
In frxMemo's BeforePrint I put: ContaPlanilha := ContaPlanilha +1;
In the text of frxMemo I put "Planilha número: [ContaPlanilha]"
It takes the value of the variable and puts it in the frxMemo as it should be, it happens that even having only 1 test record, the variable has the value set to 2 is as if it were passing twice in OnBeforePrint, but as said only 1 only record ...
I am using "Double Step" because it is a complex and precise report of some values of variables that are only available in this condition.
I think this "Double Step" is causing this problem, but how to create an incremental variable without that problem?