The integer element is primarily used for reporting. It can also be used for forms. It is commonly used when you want to iterate an unknown number of times.
For example, you may create an array full of answers and when the array is full, print the contents on the report. Check out the Top___Customer list for an example of how this works.
Used to retrieve the content of a temporary table in a report
Example:
One report with two dataintems:
1.Gl entry
2.Integer
You have a temporary table named TEMP;
This table is filled in the first dataitem;
in the trigger OnPostDataItem of Gl Entry you COUNT the number of records in TEMP table
In the trigger OnPredataItem of iInteger you make SETRANGE(number,1,<nº of records in TEMO table);
In the trigger OnAfterGetRecord of Inteder you put this code
IF Integer = 1 then
TEMP.FIND('-')
ELSE
TEMP.NEXT;
And...voilá you have a report using a temporary table.
Comments
You use it as a FOR statement in a report. By setting 'Table Filter' to:
Number=FILTER(1..5)
you get 5 itterations of your DataItem and its sub-DataItems.
Documentation for Microsoft Navision
E/R diagrams, Workflow diagrams, UML diagrams, process diagrams
For example, you may create an array full of answers and when the array is full, print the contents on the report. Check out the Top___Customer list for an example of how this works.
Example:
One report with two dataintems:
1.Gl entry
2.Integer
You have a temporary table named TEMP;
This table is filled in the first dataitem;
in the trigger OnPostDataItem of Gl Entry you COUNT the number of records in TEMP table
In the trigger OnPredataItem of iInteger you make SETRANGE(number,1,<nº of records in TEMO table);
In the trigger OnAfterGetRecord of Inteder you put this code
IF Integer = 1 then
TEMP.FIND('-')
ELSE
TEMP.NEXT;
And...voilá you have a report using a temporary table.