public override void Deserialize(IntermediateFormatReader reader)
        {
            base.Deserialize(reader);
            this.m_isDataRegion = (base.m_dataSetName != null);
            reader.RegisterDeclaration(CustomReportItem.m_Declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.DataColumnMembers:
                    this.m_dataColumnMembers = reader.ReadListOfRIFObjects <DataMemberList>();
                    break;

                case MemberName.DataRowMembers:
                    this.m_dataRowMembers = reader.ReadListOfRIFObjects <DataMemberList>();
                    break;

                case MemberName.DataRows:
                    this.m_dataRows = reader.ReadListOfRIFObjects <CustomDataRowList>();
                    break;

                case MemberName.Type:
                    this.m_type = reader.ReadString();
                    break;

                case MemberName.AltReportItem:
                    this.m_altReportItem = reader.ReadReference <ReportItem>(this);
                    break;

                case MemberName.AltReportItemIndexInParentCollectionDef:
                    this.m_altReportItemIndexInParentCollectionDef = reader.ReadInt32();
                    break;

                case MemberName.RenderReportItemColDef:
                    this.m_renderReportItem = (ReportItemCollection)reader.ReadRIFObject();
                    break;

                case MemberName.ExplicitAltReportItem:
                    this.m_explicitAltReportItemDefined = reader.ReadBoolean();
                    break;

                case MemberName.IsDataRegion:
                    this.m_isDataRegion = reader.ReadBoolean();
                    break;

                default:
                    Global.Tracer.Assert(false);
                    break;
                }
            }
        }
 public override void Deserialize(IntermediateFormatReader reader)
 {
     base.Deserialize(reader);
     reader.RegisterDeclaration(DataMember.m_Declaration);
     while (reader.NextMember())
     {
         MemberName memberName = reader.CurrentMember.MemberName;
         if (memberName == MemberName.DataMembers)
         {
             this.m_dataMembers = reader.ReadListOfRIFObjects <DataMemberList>();
         }
         else
         {
             Global.Tracer.Assert(false);
         }
     }
 }
        private int CreateAutomaticSubtotals(AutomaticSubtotalContext context, DataMemberList members, bool isColumn)
        {
            int num = 0;

            for (int i = 0; i < members.Count; i++)
            {
                DataMember dataMember = members[i];
                if (dataMember.Subtotal)
                {
                    context.CurrentIndex = context.StartIndex;
                    if (isColumn)
                    {
                        foreach (CellList cellList in context.CellLists)
                        {
                            cellList.Clear();
                        }
                    }
                    else
                    {
                        context.Rows.Clear();
                    }
                    base.BuildAndSetupAxisScopeTreeForAutoSubtotals(ref context, dataMember);
                    DataMember dataMember2 = (DataMember)dataMember.PublishClone(context, null, true);
                    context.AdjustReferences();
                    dataMember2.IsAutoSubtotal = true;
                    dataMember2.Subtotal       = false;
                    members.Insert(i + 1, dataMember2);
                    num = context.CurrentIndex - context.StartIndex;
                    if (isColumn)
                    {
                        int num2 = 0;
                        while (i < this.m_dataRows.Count)
                        {
                            this.m_dataRows[num2].Cells.InsertRange(context.CurrentIndex, context.CellLists[num2]);
                            num2++;
                        }
                        base.m_columnCount += num;
                    }
                    else
                    {
                        this.m_dataRows.InsertRange(context.CurrentIndex, context.Rows);
                        base.m_rowCount += num;
                    }
                    if (dataMember.SubMembers != null)
                    {
                        context.CurrentScope     = dataMember.Grouping.Name;
                        context.CurrentDataScope = dataMember;
                        int num3 = this.CreateAutomaticSubtotals(context, dataMember.SubMembers, isColumn);
                        if (isColumn)
                        {
                            dataMember.ColSpan += num3;
                        }
                        else
                        {
                            dataMember.RowSpan += num3;
                        }
                        num += num3;
                    }
                    else
                    {
                        context.StartIndex++;
                    }
                }
                else if (dataMember.SubMembers != null)
                {
                    if (dataMember.Grouping != null)
                    {
                        context.CurrentScope     = dataMember.Grouping.Name;
                        context.CurrentDataScope = dataMember;
                    }
                    int num4 = this.CreateAutomaticSubtotals(context, dataMember.SubMembers, isColumn);
                    if (isColumn)
                    {
                        dataMember.ColSpan += num4;
                    }
                    else
                    {
                        dataMember.RowSpan += num4;
                    }
                    num += num4;
                }
                else
                {
                    context.StartIndex++;
                }
            }
            return(num);
        }