Refactored calculation of report table numbers