Hi
I am trying like this but not working . It is giving error
DLine already exists
Identification fields and values:
Location = 'LDH',Date='01/01/17'
TEntry has key Location,Date . In Sum Amount Index field it is written Amount . In DLine table i want display Date Wise Amount Sum of Location.
TEntry.RESET;
TEntry.SETCURRENTKEY("Location",Date);
TEntry.SETFILTER("Location","No.");
TEntry.SETRANGE(TEntry.Date,StartDate,EndDate);
IF TEntry.FINDFIRST THEN BEGIN
REPEAT
DLine.INIT;
DLine."Location" := "No.";
DLine."Date" := TEntry.Date;
DLine."Amount" := TEntry."Amount";
DLine.Status := 0;
DLine.INSERT;
UNTIL TEntry.NEXT=0;
END;
Thanks