COUNTing the number of similar records

Hi, Does anyone knows a simple way to count the number for records that have the same value. For example, if a field “Container Type” can have 5 different value then I want to count, while generating a report, that the number of shipments (per shipping company or destination) have been made per “Container type”. For more clearification, Shipper – Cont.type – Nr. of cont. XYZ ---------- 1 ---------- 10 --------------- 2 --------- 15 and so on … Thanks in advance. Tariq

Try this: Set up a key on the table with Shipper and Cont.type Then suppress the bodysection and only show the group footers where You show a counter that You reset in OnPostSection Trigger. The counter should be increased in the OnAfterGetRecord Trigger

Thanks for help Lars. Your solution works but now I’m experiencing another problem. That is, repport is counting in batches. Output is like … Shipper : XYZ Container type ----- Nr. of Containers ------ 1 ------------------ 5 ------ 2 ------------------ 11 ------ 5 ------------------ 7 ------ 2 ------------------ 1 ------ 2 ------------------ 8 ------ 1 ------------------ 25 Do you have any idea how to further add similar types together? Could this be because of the active Key, which is, Shipper,Destination,Cont.type ? If yes, is it possible to get the required result on this Key? Since I need to group by ‘Destination’ as well. The report would switch between ‘Shipper’ & ‘Destination’, depending on the filters applied. Thanks a lot. Tariq