Hi guys i try to understand the DataItem - Integer( is not explained on Microsoft Manual).
Can you help to understand the Sales Invoice. This report has Integer (CopyLoop, PageLoop and DimensionLoop). What is the function of each one?
Thanks in advance.
0
Comments
Usually in order to repeat some code you would do something like
FOR i := Min TO Max DO BEGIN
//My Code
END;
The Integer data item is your FOR loop. Instead of a variable your iterator is the Number field from the Integer table. You'll see it set in either the Properties of the data item or the OnPreDataItem trigger with SETRANGE. These set the Min and Max values and, much like the loop, the report handles the actual increment of the iterator.
My Blog - nav.education
And as Procat said, imagine that sometimes your loop will have only one iteration.
Furthermore there is one thing to consider as well. When the loop is used to run through all records of a temporary table there might be some code in OnAfterGetRecord to delimit the loop and step through the temporary table.