refactored ScheduleTableReport to be compatible with latest database structure