This error is caused by a mismatch in the grouping. The recordset and the report must use the same grouping.