How to build a department report using Custom Report?

There is a sample here for preparing a payments report for departments .

I thought preparing an additional section for each department will be handy as you’ll be able to order, format them as you want however as you have 18 departments (wow) it might be a little hard to prepare. I’ll think about a better syntax for that.

If you give some more details about what you need to see in department report I can prepare one for you.