depends on your table design
you can find out who has outstanding balances by summing the credits and debits
if the balance is zero then they owe nothing, how you treat credits, ie you owe them is up to you)
you shouldn't need to use an IIF for this.
so you could run your first query to identify who has an outstanding balance, use that (as a subselect linked by customer number) as part of the feed to main query used in the statement report which identifies the transactions or inovices and so on as part of the statment report. traditonally statements are sent out periodically and you would need to screen items on the statement which predate the statement
a customer wouldn't want to see a list of every transaction just the ones in the current statement period (along with any outstanding invoices)
most accounting system allocate a specific payment to a specific invoice, they may make a single payment which straddles many invoices, they may make a partial payment on an invoice. sometimes how you habdle that is upto your accounts procedures