I don't think there is any out of the box functionality that does that.
But if you use the customer template then you can define dimensions in the template. That is what is there out of the box.

To really do what you ask for you will have to do a customization.
You should also be aware that the customer no. basically is on all transactions in the system that origins from a customer transactions.
In the ledger tables you will typically find them by using the two fields source type and Source no.
Filter on source type = customer and Source No = customer no. and you will have every transaction related to that customer.
Basing your reporting on that could be an alternative to do a customization.