Reporting attempt 3

I'm (almost) happy with this one. There's still some work to be done around formatters, but I'm quite happy with how the rest of that turned out.

IMO it's much neater and more flexible than the first few attempts we've had.