Hi wizards

I have a sales ledger which shows invoice no, customer name, invoice value, and amount paid, I wish to produce a summary that shows a one line entry for customers that have unpaid. The problem I have is if a customer has more than one invoice unpaid, I get an entry for each invoice.

I also want to count the number of customers, on the sales ledger, which sounds easy enough but again I can't get round duplicates

Thanks