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

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

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

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

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

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

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

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

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

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
Example #2
0
 public override void Deserialize(IntermediateFormatReader reader)
 {
     base.Deserialize(reader);
     reader.RegisterDeclaration(m_Declaration);
     while (reader.NextMember())
     {
         MemberName memberName = reader.CurrentMember.MemberName;
         if (memberName == MemberName.DataMembers)
         {
             m_dataMembers = reader.ReadListOfRIFObjects <DataMemberList>();
         }
         else
         {
             Global.Tracer.Assert(condition: false);
         }
     }
 }
Example #3
0
        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();
                    }
                    BuildAndSetupAxisScopeTreeForAutoSubtotals(ref context, dataMember);
                    DataMember dataMember2 = (DataMember)dataMember.PublishClone(context, null, isSubtotal: 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 < m_dataRows.Count)
                        {
                            m_dataRows[num2].Cells.InsertRange(context.CurrentIndex, context.CellLists[num2]);
                            num2++;
                        }
                        m_columnCount += num;
                    }
                    else
                    {
                        m_dataRows.InsertRange(context.CurrentIndex, context.Rows);
                        m_rowCount += num;
                    }
                    if (dataMember.SubMembers != null)
                    {
                        context.CurrentScope     = dataMember.Grouping.Name;
                        context.CurrentDataScope = dataMember;
                        int num3 = 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 = CreateAutomaticSubtotals(context, dataMember.SubMembers, isColumn);
                    if (isColumn)
                    {
                        dataMember.ColSpan += num4;
                    }
                    else
                    {
                        dataMember.RowSpan += num4;
                    }
                    num += num4;
                }
                else
                {
                    context.StartIndex++;
                }
            }
            return(num);
        }