Fixed method of filtering records for report building