How a reporting system works under the hood