FIx undefined index in reports when attedance function is disabled