I have seen many report used integer table.I read a lot about it that it used as temp table ,copy data on multiple pages of report,as for loop
But i am not getting how it works step by step if anyone can know please tell me how it works
also when & why use more than one integer table like 2,3... integer table with different name.
thanks in advance
0
Answers
The integer table is used for loop on "something" when you don't have a table for data item.
To do that, you create a data item on the integer table and, before it (in previous data item, onPreReport, onPreDataItem,..) you compile a temp table variable.
On the OnAfterGetRecord of the integer data item you manage manually the temp table (with findset, next,..) and compile some adding variable to use in dataitem.
You can filter the integer table using a SETRANGE on Number field in the OnPreDataItem or use CurrReport.QUIT to exit the report when find TempTable.NEXT=0.
The reason why you should use more than one integer table dataitem is depending on your report necessity: as you use Header Table and Line Table you may need to use Integer1 and Integer2.
This is used a lot especially when you need to calculate totals or filter tables in a unconventional manner.
Hope it helps,
Have a nice day