Ok so i've created a report with a dataitem(Item; Item).
Now for every record in the Item table i want to add a few variables into another table now i was wondering if within the dataitem i am already holding a record or if i still need to loop over them?
as an example of what i mean:
dataitem(Item; Item)
{
RequestFilterFields = Description, "Vendor No.", "Item Category Code";
trigger OnAfterGetRecord()
var
OtherTable: Record "OtherTable";
begin
OtherTable.Init();
OtherTable."Item No." := Item."No.";
OtherTable.Insert(true);
end;
}
or do i need to use:
dataitem(Item; Item)
{
repeat
RequestFilterFields = Description, "Vendor No.", "Item Category Code";
trigger OnAfterGetRecord()
var
OtherTable: Record "Other Table";
begin
OtherTable.Init();
OtherTable."Item No." := Item."No.";
OtherTable.Insert(true);
end;
until Item.Next = 0;
}
thanks in advance