internal override object PublishClone(AutomaticSubtotalContext context, DataRegion newContainingRegion, bool isSubtotal) { if (isSubtotal && m_grouping != null) { context.RegisterScopeName(m_grouping.Name); } DataMember dataMember = (DataMember)base.PublishClone(context, newContainingRegion, isSubtotal); if (m_dataMembers != null) { dataMember.m_dataMembers = new DataMemberList(m_dataMembers.Count); foreach (DataMember dataMember3 in m_dataMembers) { DataMember dataMember2 = (DataMember)dataMember3.PublishClone(context, newContainingRegion, isSubtotal); dataMember2.ParentMember = this; dataMember.m_dataMembers.Add(dataMember2); } } if (m_dataMembers == null && isSubtotal) { RowList rows = context.CurrentDataRegion.Rows; if (m_isColumn) { for (int i = 0; i < rows.Count; i++) { Cell value = (Cell)rows[i].Cells[context.CurrentIndex].PublishClone(context); context.CellLists[i].Add(value); } } else { context.Rows.Add((Row)rows[context.CurrentIndex].PublishClone(context)); } context.CurrentIndex++; } return(dataMember); }