I got my own solution… [:D] I used increment…
(LineNo= declared variable)
Line - OnAfterGetRecord
LineNo := LineNo + 1;