Counting records in a report

I am working on the Export Direct Deposit Report. I want to count the number of employees the report returns and put it at the bottom of the last page of the report. I can’t find a report in base Navision that is doing this. Any ideas on how to count records in a report?

Hi, Define a variable Counter with type Integer. In the C/AL OnAfterGetRecord put the code as Counter := Counter + 1. then in footer of the report define a text box and in the sourceexpersion add the variable Counter. Thanks Best regards Suresh. New York

Works great, Suresh. Thank you very much

Or you could “rec.count”. This returns the number if record in the record. Including filters. Suresh Bhat’s solution is faster tho!