Documentation()
OnInitReport()
OnPreReport()
OnPostReport()
Sales Header - OnPreDataItem()
SalesHeader.GET();
FOR i:= 1 TO 5 DO BEGIN
TopFiveAmount[i].Amount:=0;
SalesHeader.Amount:=0;
END;
SalesHeader.SETCURRENTKEY(Amount);
SalesHeader.SETASCENDING(Amount,TRUE);
i:=1;
IF SalesHeader.FINDSET THEN BEGIN
REPEAT
IF SalesHeader.Amount>TopFiveAmount[5].Amount THEN BEGIN
TopFiveAmount[5].Amount:=SalesHeader.Amount;
FOR i := 4 DOWNTO 1 DO BEGIN
IF TopFiveAmount[i].Amount<TopFiveAmount[i+1].Amount THEN BEGIN
TopFiveAmount[i+1]:=TopFiveAmount[i];
TopFiveAmount[i]:=TopFiveAmount[i+1];
END;
END;
END;
UNTIL SalesHeader.NEXT=0;
END;
Sales Header - OnAfterGetRecord()
Sales Header - OnPostDataItem()
When I run this report this msg will shown can you please help me solve .