private DataRegionMemberInstance(OnDemandProcessingContext odpContext, ReportHierarchyNode memberDef, long firstRowOffset, int memberInstanceIndexWithinScopeLevel, int recursiveLevel, List <object> groupExpressionValues, object[] groupVariableValues)
     : base(firstRowOffset)
 {
     m_memberDef = memberDef;
     m_memberInstanceIndexWithinScopeLevel = memberInstanceIndexWithinScopeLevel;
     m_recursiveLevel = recursiveLevel;
     if (groupExpressionValues != null && groupExpressionValues.Count != 0)
     {
         m_groupExprValues = new object[groupExpressionValues.Count];
         for (int i = 0; i < m_groupExprValues.Length; i++)
         {
             object obj = groupExpressionValues[i];
             if (obj == DBNull.Value)
             {
                 obj = null;
             }
             m_groupExprValues[i] = obj;
         }
     }
     StoreAggregates(odpContext, memberDef.Grouping.Aggregates);
     StoreAggregates(odpContext, memberDef.Grouping.RecursiveAggregates);
     StoreAggregates(odpContext, memberDef.Grouping.PostSortAggregates);
     StoreAggregates(odpContext, memberDef.RunningValues);
     if (memberDef.DataScopeInfo != null)
     {
         DataScopeInfo dataScopeInfo = memberDef.DataScopeInfo;
         StoreAggregates(odpContext, dataScopeInfo.AggregatesOfAggregates);
         StoreAggregates(odpContext, dataScopeInfo.PostSortAggregatesOfAggregates);
         StoreAggregates(odpContext, dataScopeInfo.RunningValuesOfAggregates);
     }
     m_variables = groupVariableValues;
 }
 private void CaptureGroupingFieldsForServerAggregates(InitializationContext context, IRIFDataScope scope)
 {
     if (this.m_groupingFieldIndicesForServerAggregates == null)
     {
         this.m_groupingFieldIndicesForServerAggregates = new List <int>();
         if (this.m_dataSet != null)
         {
             ScopeTree scopeTree = context.ScopeTree;
             if (scopeTree.IsIntersectionScope(scope))
             {
                 this.AddGroupingFieldIndicesFromParentScope(context, scopeTree.GetParentRowScopeForIntersection(scope));
                 this.AddGroupingFieldIndicesFromParentScope(context, scopeTree.GetParentColumnScopeForIntersection(scope));
             }
             else
             {
                 IRIFDataScope parentScope = scopeTree.GetParentScope(scope);
                 if (parentScope != null)
                 {
                     this.AddGroupingFieldIndicesFromParentScope(context, parentScope);
                 }
                 ReportHierarchyNode reportHierarchyNode = scope as ReportHierarchyNode;
                 if (reportHierarchyNode != null && !reportHierarchyNode.IsStatic && !reportHierarchyNode.Grouping.IsDetail)
                 {
                     foreach (ExpressionInfo groupExpression in reportHierarchyNode.Grouping.GroupExpressions)
                     {
                         if (groupExpression.Type == ExpressionInfo.Types.Field)
                         {
                             this.m_groupingFieldIndicesForServerAggregates.Add(groupExpression.FieldIndex);
                         }
                     }
                 }
             }
         }
     }
 }
예제 #3
0
        private bool GetMemberIndex(ref int index, ReportHierarchyNode node)
        {
            IEnumerator enumerator = GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    ReportHierarchyNode reportHierarchyNode = (ReportHierarchyNode)enumerator.Current;
                    if (reportHierarchyNode.InnerHierarchy == null)
                    {
                        index++;
                        if (node == reportHierarchyNode)
                        {
                            return(true);
                        }
                    }
                    else if (reportHierarchyNode.InnerHierarchy.GetMemberIndex(ref index, node))
                    {
                        return(true);
                    }
                }
            }
            finally
            {
                IDisposable disposable = enumerator as IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            return(false);
        }
예제 #4
0
        public int GetMemberIndex(ReportHierarchyNode node)
        {
            Global.Tracer.Assert(node.InnerHierarchy == null, "GetMemberIndex should not be called for non leaf node");
            int result = -1;

            this.GetMemberIndex(ref result, node);
            return(result);
        }
예제 #5
0
        internal int GetMemberIndex(ReportHierarchyNode node)
        {
            Global.Tracer.Assert(node.InnerHierarchy == null, "GetMemberIndex should not be called for non leaf node");
            int index = -1;

            GetMemberIndex(ref index, node);
            return(index);
        }
예제 #6
0
        internal object PublishClone(AutomaticSubtotalContext context, ReportHierarchyNode owner)
        {
            int          count        = Count;
            GroupingList groupingList = new GroupingList(count);

            for (int i = 0; i < count; i++)
            {
                groupingList.Add(this[i].PublishClone(context, owner));
            }
            return(groupingList);
        }
예제 #7
0
        internal Grouping CloneForDomainScope(AutomaticSubtotalContext context, ReportHierarchyNode cloneOwner)
        {
            Grouping grouping = new Grouping(ConstructionPhase.Publishing);

            grouping.m_isClone         = true;
            grouping.m_ID              = context.GenerateID();
            grouping.m_owner           = cloneOwner;
            cloneOwner.OriginalScopeID = Owner.DataScopeInfo.ScopeID;
            Global.Tracer.Assert(m_name != null, "Group Name cannot be null");
            grouping.m_name = context.CreateAndRegisterUniqueGroupName(m_name, m_isClone, isDomainScope: true);
            CloneGroupExpressions(context, grouping);
            return(grouping);
        }
예제 #8
0
        public override void CreateDomainScopeMember(ReportHierarchyNode parentNode, Grouping grouping, AutomaticSubtotalContext context)
        {
            GaugeMember gaugeMember = new GaugeMember(context.GenerateID(), this);

            gaugeMember.Grouping = grouping.CloneForDomainScope(context, gaugeMember);
            HierarchyNodeList hierarchyNodeList = (parentNode != null) ? parentNode.InnerHierarchy : ColumnMembers;

            if (hierarchyNodeList != null)
            {
                hierarchyNodeList.Add(gaugeMember);
                gaugeMember.IsColumn = true;
                GaugeRow.Cells.Insert(ColumnMembers.GetMemberIndex(gaugeMember), new GaugeCell(context.GenerateID(), this));
                base.ColumnCount++;
            }
        }
예제 #9
0
 private static void CalculateLeafCellIndexes(HierarchyNodeList nodes, ref List <int> leafCellIndexes, int excludedCellIndex)
 {
     if (leafCellIndexes == null)
     {
         int count = nodes.Count;
         leafCellIndexes = new List <int>(count);
         for (int i = 0; i < count; i++)
         {
             ReportHierarchyNode reportHierarchyNode = nodes[i];
             if (reportHierarchyNode.InnerHierarchy == null && reportHierarchyNode.MemberCellIndex != excludedCellIndex)
             {
                 leafCellIndexes.Add(reportHierarchyNode.MemberCellIndex);
             }
         }
     }
 }
예제 #10
0
 private void FindLeafNodes(List <ReportHierarchyNode> leafNodes)
 {
     for (int i = 0; i < base.Count; i++)
     {
         ReportHierarchyNode reportHierarchyNode = this[i];
         HierarchyNodeList   innerHierarchy      = reportHierarchyNode.InnerHierarchy;
         if (innerHierarchy == null)
         {
             leafNodes.Add(reportHierarchyNode);
         }
         else
         {
             innerHierarchy.FindLeafNodes(leafNodes);
         }
     }
 }
예제 #11
0
 private bool GetMemberIndex(ref int index, ReportHierarchyNode node)
 {
     foreach (ReportHierarchyNode item in this)
     {
         if (item.InnerHierarchy == null)
         {
             index++;
             if (object.ReferenceEquals(node, item))
             {
                 return(true);
             }
         }
         else if (item.InnerHierarchy.GetMemberIndex(ref index, node))
         {
             return(true);
         }
     }
     return(false);
 }
        public override void Deserialize(IntermediateFormatReader reader)
        {
            base.Deserialize(reader);
            reader.RegisterDeclaration(m_Declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.ID:
                    m_memberDef = reader.ReadGlobalReference <ReportHierarchyNode>();
                    break;

                case MemberName.MemberInstanceIndexWithinScopeLevel:
                    m_memberInstanceIndexWithinScopeLevel = reader.Read7BitEncodedInt();
                    break;

                case MemberName.Children:
                    m_children = reader.ReadGenericListOfRIFObjectsUsingNew <ScalableList <DataRegionMemberInstance> >();
                    SetReadOnlyList(m_children);
                    break;

                case MemberName.Cells2:
                    m_cells = reader.ReadRIFObject <ScalableList <DataCellInstanceList> >();
                    break;

                case MemberName.Cells:
                    m_upgradedSnapshotCells = reader.ReadGenericListOfRIFObjectsUsingNew <ScalableList <DataCellInstance> >();
                    SetReadOnlyList(m_upgradedSnapshotCells);
                    break;

                case MemberName.Variables:
                    m_variables = reader.ReadVariantArray();
                    break;

                case MemberName.SerializableVariables:
                    m_variables = reader.ReadSerializableArray();
                    break;

                case MemberName.RecursiveLevel:
                    m_recursiveLevel = reader.Read7BitEncodedInt();
                    break;

                case MemberName.GroupExpressionValues:
                    m_groupExprValues = reader.ReadVariantArray();
                    break;

                case MemberName.ParentInstanceIndex:
                    m_parentInstanceIndex = reader.ReadInt32();
                    break;

                case MemberName.HasRecursiveChildren:
                {
                    object obj = reader.ReadVariant();
                    if (obj != null)
                    {
                        m_hasRecursiveChildren = (bool)obj;
                    }
                    break;
                }

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
        internal static DataRegionMemberInstance CreateInstance(IMemberHierarchy parentInstance, OnDemandProcessingContext odpContext, ReportHierarchyNode memberDef, long firstRowOffset, int memberInstanceIndexWithinScopeLevel, int recursiveLevel, List <object> groupExpressionValues, object[] groupVariableValues, out int instanceIndex)
        {
            DataRegionMemberInstance dataRegionMemberInstance = new DataRegionMemberInstance(odpContext, memberDef, firstRowOffset, memberInstanceIndexWithinScopeLevel, recursiveLevel, groupExpressionValues, groupVariableValues);

            dataRegionMemberInstance.m_cleanupRef = parentInstance.AddMemberInstance(dataRegionMemberInstance, memberDef.IndexInCollection, odpContext.OdpMetadata.GroupTreeScalabilityCache, out instanceIndex);
            return(dataRegionMemberInstance);
        }
        private static DeclarationList CreateCurrentDeclarations()
        {
            DeclarationList declarationList = new DeclarationList();
            int             num             = 1;

            declarationList[num++] = IDOwner.GetDeclaration();
            declarationList[num++] = ReportItem.GetDeclaration();
            num++;
            declarationList[num++] = Report.GetDeclaration();
            declarationList[num++] = PageSection.GetDeclaration();
            declarationList[num++] = Line.GetDeclaration();
            declarationList[num++] = Rectangle.GetDeclaration();
            declarationList[num++] = Image.GetDeclaration();
            num++;
            declarationList[num++] = CheckBox.GetDeclaration();
            declarationList[num++] = TextBox.GetDeclaration();
            declarationList[num++] = SubReport.GetDeclaration();
            declarationList[num++] = ActiveXControl.GetDeclaration();
            declarationList[num++] = DataRegion.GetDeclaration();
            num++;
            declarationList[num++] = ReportHierarchyNode.GetDeclaration();
            declarationList[num++] = Grouping.GetDeclaration();
            declarationList[num++] = Sorting.GetDeclaration();
            declarationList[num++] = List.GetDeclaration();
            declarationList[num++] = Pivot.GetDeclaration();
            declarationList[num++] = Matrix.GetDeclaration();
            declarationList[num++] = PivotHeading.GetDeclaration();
            declarationList[num++] = MatrixHeading.GetDeclaration();
            declarationList[num++] = MatrixColumn.GetDeclaration();
            num++;
            declarationList[num++] = MatrixRow.GetDeclaration();
            num++;
            declarationList[num++] = Subtotal.GetDeclaration();
            declarationList[num++] = Table.GetDeclaration();
            declarationList[num++] = TableColumn.GetDeclaration();
            num++;
            declarationList[num++] = TableGroup.GetDeclaration();
            declarationList[num++] = TableRow.GetDeclaration();
            num++;
            declarationList[num++] = OWCChart.GetDeclaration();
            declarationList[num++] = ChartColumn.GetDeclaration();
            num++;
            declarationList[num++] = ReportItemCollection.GetDeclaration();
            declarationList[num++] = ReportItemIndexer.GetDeclaration();
            num++;
            declarationList[num++] = Style.GetDeclaration();
            num++;
            declarationList[num++] = AttributeInfo.GetDeclaration();
            declarationList[num++] = Visibility.GetDeclaration();
            declarationList[num++] = ExpressionInfo.GetDeclaration();
            num++;
            declarationList[num++] = DataAggregateInfo.GetDeclaration();
            num++;
            declarationList[num++] = RunningValueInfo.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = Filter.GetDeclaration();
            num++;
            declarationList[num++] = DataSource.GetDeclaration();
            num++;
            declarationList[num++] = DataSet.GetDeclaration();
            num++;
            declarationList[num++] = ReportQuery.GetDeclaration();
            declarationList[num++] = Field.GetDeclaration();
            num++;
            declarationList[num++] = ParameterValue.GetDeclaration();
            num++;
            num++;
            num++;
            num++;
            declarationList[num++] = ReportSnapshot.GetDeclaration();
            declarationList[num++] = SenderInformation.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = ReceiverInformation.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = DocumentMapNode.GetDeclaration();
            declarationList[num++] = InfoBase.GetDeclaration();
            declarationList[num++] = OffsetInfo.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = ReportItemInstanceInfo.GetDeclaration();
            declarationList[num++] = ReportInstanceInfo.GetDeclaration();
            declarationList[num++] = ReportItemColInstanceInfo.GetDeclaration();
            declarationList[num++] = LineInstanceInfo.GetDeclaration();
            declarationList[num++] = TextBoxInstanceInfo.GetDeclaration();
            declarationList[num++] = RectangleInstanceInfo.GetDeclaration();
            declarationList[num++] = CheckBoxInstanceInfo.GetDeclaration();
            declarationList[num++] = ImageInstanceInfo.GetDeclaration();
            declarationList[num++] = SubReportInstanceInfo.GetDeclaration();
            declarationList[num++] = ActiveXControlInstanceInfo.GetDeclaration();
            declarationList[num++] = ListInstanceInfo.GetDeclaration();
            declarationList[num++] = ListContentInstanceInfo.GetDeclaration();
            declarationList[num++] = MatrixInstanceInfo.GetDeclaration();
            declarationList[num++] = MatrixHeadingInstanceInfo.GetDeclaration();
            declarationList[num++] = MatrixCellInstanceInfo.GetDeclaration();
            declarationList[num++] = TableInstanceInfo.GetDeclaration();
            declarationList[num++] = TableGroupInstanceInfo.GetDeclaration();
            declarationList[num++] = TableRowInstanceInfo.GetDeclaration();
            declarationList[num++] = OWCChartInstanceInfo.GetDeclaration();
            declarationList[num++] = ChartInstanceInfo.GetDeclaration();
            declarationList[num++] = NonComputedUniqueNames.GetDeclaration();
            declarationList[num++] = InstanceInfoOwner.GetDeclaration();
            declarationList[num++] = ReportItemInstance.GetDeclaration();
            num++;
            declarationList[num++] = ReportInstance.GetDeclaration();
            declarationList[num++] = ReportItemColInstance.GetDeclaration();
            declarationList[num++] = LineInstance.GetDeclaration();
            declarationList[num++] = TextBoxInstance.GetDeclaration();
            declarationList[num++] = RectangleInstance.GetDeclaration();
            declarationList[num++] = CheckBoxInstance.GetDeclaration();
            declarationList[num++] = ImageInstance.GetDeclaration();
            declarationList[num++] = SubReportInstance.GetDeclaration();
            declarationList[num++] = ActiveXControlInstance.GetDeclaration();
            declarationList[num++] = ListInstance.GetDeclaration();
            declarationList[num++] = ListContentInstance.GetDeclaration();
            num++;
            declarationList[num++] = MatrixInstance.GetDeclaration();
            declarationList[num++] = MatrixHeadingInstance.GetDeclaration();
            num++;
            declarationList[num++] = MatrixCellInstance.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = TableInstance.GetDeclaration();
            declarationList[num++] = TableRowInstance.GetDeclaration();
            declarationList[num++] = TableColumnInstance.GetDeclaration();
            declarationList[num++] = TableGroupInstance.GetDeclaration();
            num++;
            declarationList[num++] = OWCChartInstance.GetDeclaration();
            declarationList[num++] = ParameterInfo.GetDeclaration();
            num++;
            num++;
            num++;
            declarationList[num++] = InstanceInfo.GetDeclaration();
            num++;
            declarationList[num++] = RecordSetInfo.GetDeclaration();
            declarationList[num++] = RecordRow.GetDeclaration();
            declarationList[num++] = RecordField.GetDeclaration();
            declarationList[num++] = ValidValue.GetDeclaration();
            num++;
            declarationList[num++] = ParameterDataSource.GetDeclaration();
            declarationList[num++] = ParameterDef.GetDeclaration();
            num++;
            declarationList[num++] = ParameterBase.GetDeclaration();
            num++;
            declarationList[num++] = ProcessingMessage.GetDeclaration();
            declarationList[num++] = MatrixSubtotalHeadingInstanceInfo.GetDeclaration();
            declarationList[num++] = MatrixSubtotalCellInstance.GetDeclaration();
            declarationList[num++] = CodeClass.GetDeclaration();
            num++;
            declarationList[num++] = TableDetail.GetDeclaration();
            declarationList[num++] = TableDetailInstance.GetDeclaration();
            num++;
            declarationList[num++] = TableDetailInstanceInfo.GetDeclaration();
            num++;
            declarationList[num++] = Action.GetDeclaration();
            declarationList[num++] = ActionInstance.GetDeclaration();
            declarationList[num++] = Chart.GetDeclaration();
            declarationList[num++] = ChartHeading.GetDeclaration();
            declarationList[num++] = ChartDataPoint.GetDeclaration();
            num++;
            declarationList[num++] = MultiChart.GetDeclaration();
            declarationList[num++] = MultiChartInstance.GetDeclaration();
            num++;
            declarationList[num++] = Axis.GetDeclaration();
            declarationList[num++] = AxisInstance.GetDeclaration();
            declarationList[num++] = ChartTitle.GetDeclaration();
            declarationList[num++] = ChartTitleInstance.GetDeclaration();
            declarationList[num++] = ThreeDProperties.GetDeclaration();
            declarationList[num++] = PlotArea.GetDeclaration();
            declarationList[num++] = Legend.GetDeclaration();
            declarationList[num++] = GridLines.GetDeclaration();
            declarationList[num++] = ChartDataLabel.GetDeclaration();
            declarationList[num++] = ChartInstance.GetDeclaration();
            declarationList[num++] = ChartHeadingInstance.GetDeclaration();
            declarationList[num++] = ChartHeadingInstanceInfo.GetDeclaration();
            num++;
            declarationList[num++] = ChartDataPointInstance.GetDeclaration();
            declarationList[num++] = ChartDataPointInstanceInfo.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = RenderingPagesRanges.GetDeclaration();
            num++;
            declarationList[num++] = IntermediateFormatVersion.GetDeclaration();
            declarationList[num++] = ImageInfo.GetDeclaration();
            declarationList[num++] = ActionItem.GetDeclaration();
            declarationList[num++] = ActionItemInstance.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = DataValue.GetDeclaration();
            declarationList[num++] = DataValueInstance.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = Tablix.GetDeclaration();
            declarationList[num++] = TablixHeading.GetDeclaration();
            declarationList[num++] = CustomReportItem.GetDeclaration();
            declarationList[num++] = CustomReportItemInstance.GetDeclaration();
            declarationList[num++] = CustomReportItemHeading.GetDeclaration();
            declarationList[num++] = CustomReportItemHeadingInstance.GetDeclaration();
            num++;
            num++;
            num++;
            num++;
            declarationList[num++] = CustomReportItemCellInstance.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = DataValueCRIList.GetDeclaration();
            declarationList[num++] = BookmarkInformation.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = DrillthroughInformation.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            num++;
            declarationList[num++] = CustomReportItemInstanceInfo.GetDeclaration();
            declarationList[num++] = ImageMapAreaInstanceList.GetDeclaration();
            declarationList[num++] = ImageMapAreaInstance.GetDeclaration();
            num++;
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = SortFilterEventInfo.GetDeclaration();
            declarationList[num++] = EndUserSort.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = RecordSetPropertyNames.GetDeclaration();
            num++;
            num++;
            num++;
            declarationList[num++] = PageSectionInstance.GetDeclaration();
            num++;
            declarationList[num++] = PageSectionInstanceInfo.GetDeclaration();
            declarationList[num++] = SimpleTextBoxInstanceInfo.GetDeclaration();
            declarationList[num++] = ScopeLookupTable.GetDeclaration();
            num++;
            declarationList[num++] = ReportDrillthroughInfo.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            Global.Tracer.Assert(declarationList.Count == num, "(current.Count == index)");
            return(declarationList);
        }
예제 #15
0
 public override void PreVisit(ReportHierarchyNode member)
 {
     base.PreVisit(member);
     this.SetDataSetForScope(member);
 }
 public IOnDemandMemberInstanceReference GetFirstMemberInstance(ReportHierarchyNode rifMember)
 {
     return(null);
 }
 public virtual void PreVisit(ReportHierarchyNode member)
 {
     m_tree.RegisterGrouping(member);
 }
 public override void CreateDomainScopeMember(ReportHierarchyNode parentNode, Grouping grouping, AutomaticSubtotalContext context)
 {
     Global.Tracer.Assert(false, "CreateDomainScopeMember should not be called for MapDataRegion");
 }
예제 #19
0
        public object PublishClone(AutomaticSubtotalContext context, ReportHierarchyNode owner)
        {
            Grouping grouping = (Grouping)base.MemberwiseClone();

            grouping.m_isClone = true;
            grouping.m_ID      = context.GenerateID();
            grouping.m_owner   = owner;
            if (this.DomainScope != null)
            {
                grouping.DomainScope = context.GetNewScopeName(this.DomainScope);
                if (string.CompareOrdinal(this.DomainScope, grouping.DomainScope) != 0)
                {
                    context.DomainScopeGroups.Add(grouping);
                }
                else
                {
                    grouping.m_scopeIDForDomainScope = this.Owner.DataScopeInfo.ScopeID;
                }
            }
            context.AddAggregateHolder(grouping);
            Global.Tracer.Assert(this.m_name != null);
            grouping.m_name = context.CreateAndRegisterUniqueGroupName(this.m_name, this.m_isClone);
            context.AddSortTarget(grouping.m_name, grouping);
            this.CloneGroupExpressions(context, grouping);
            if (this.m_groupLabel != null)
            {
                grouping.m_groupLabel = (ExpressionInfo)this.m_groupLabel.PublishClone(context);
            }
            if (this.m_sortDirections != null)
            {
                grouping.m_sortDirections = new List <bool>(this.m_sortDirections.Count);
                foreach (bool sortDirection in this.m_sortDirections)
                {
                    grouping.m_sortDirections.Add(sortDirection);
                }
            }
            grouping.m_aggregates          = new List <DataAggregateInfo>();
            grouping.m_recursiveAggregates = new List <DataAggregateInfo>();
            grouping.m_postSortAggregates  = new List <DataAggregateInfo>();
            if (this.m_filters != null)
            {
                grouping.m_filters = new List <Filter>(this.m_filters.Count);
                foreach (Filter filter in this.m_filters)
                {
                    grouping.m_filters.Add((Filter)filter.PublishClone(context));
                }
            }
            if (this.m_parent != null)
            {
                grouping.m_parent = new List <ExpressionInfo>(this.m_parent.Count);
                foreach (ExpressionInfo item in this.m_parent)
                {
                    grouping.m_parent.Add((ExpressionInfo)item.PublishClone(context));
                }
            }
            if (this.m_dataElementName != null)
            {
                grouping.m_dataElementName = (string)this.m_dataElementName.Clone();
            }
            if (this.m_userSortExpressions != null)
            {
                grouping.m_userSortExpressions = new List <ExpressionInfo>(this.m_userSortExpressions.Count);
                foreach (ExpressionInfo userSortExpression in this.m_userSortExpressions)
                {
                    grouping.m_userSortExpressions.Add((ExpressionInfo)userSortExpression.PublishClone(context));
                }
            }
            if (this.m_variables != null)
            {
                grouping.m_variables = new List <Variable>(this.m_variables.Count);
                foreach (Variable variable in this.m_variables)
                {
                    grouping.m_variables.Add((Variable)variable.PublishClone(context));
                }
            }
            if (this.m_nonDetailSortFiltersInScope != null)
            {
                grouping.m_nonDetailSortFiltersInScope = new InScopeSortFilterHashtable(this.m_nonDetailSortFiltersInScope.Count);
                IDictionaryEnumerator enumerator6 = this.m_nonDetailSortFiltersInScope.GetEnumerator();
                try
                {
                    while (enumerator6.MoveNext())
                    {
                        object          current6        = enumerator6.Current;
                        DictionaryEntry dictionaryEntry = (DictionaryEntry)current6;
                        List <int>      list            = (List <int>)dictionaryEntry.Value;
                        List <int>      list2           = new List <int>(list.Count);
                        foreach (int item2 in list)
                        {
                            list2.Add(item2);
                        }
                        grouping.m_nonDetailSortFiltersInScope.Add(dictionaryEntry.Key, list2);
                    }
                }
                finally
                {
                    IDisposable disposable = enumerator6 as IDisposable;
                    if (disposable != null)
                    {
                        disposable.Dispose();
                    }
                }
            }
            if (this.m_detailSortFiltersInScope != null)
            {
                grouping.m_detailSortFiltersInScope = new InScopeSortFilterHashtable(this.m_detailSortFiltersInScope.Count);
                IDictionaryEnumerator enumerator8 = this.m_detailSortFiltersInScope.GetEnumerator();
                try
                {
                    while (enumerator8.MoveNext())
                    {
                        object          current8         = enumerator8.Current;
                        DictionaryEntry dictionaryEntry2 = (DictionaryEntry)current8;
                        List <int>      list3            = (List <int>)dictionaryEntry2.Value;
                        List <int>      list4            = new List <int>(list3.Count);
                        foreach (int item3 in list3)
                        {
                            list4.Add(item3);
                        }
                        grouping.m_detailSortFiltersInScope.Add(dictionaryEntry2.Key, list4);
                    }
                }
                finally
                {
                    IDisposable disposable2 = enumerator8 as IDisposable;
                    if (disposable2 != null)
                    {
                        disposable2.Dispose();
                    }
                }
            }
            if (this.m_pageBreak != null)
            {
                grouping.m_pageBreak = (PageBreak)this.m_pageBreak.PublishClone(context);
            }
            if (this.m_pageName != null)
            {
                grouping.m_pageName = (ExpressionInfo)this.m_pageName.PublishClone(context);
            }
            return(grouping);
        }
예제 #20
0
 public virtual void PostVisit(ReportHierarchyNode member)
 {
     this.m_tree.UnRegisterGrouping(member);
 }
예제 #21
0
        internal object PublishClone(AutomaticSubtotalContext context, ReportHierarchyNode owner)
        {
            Grouping grouping = (Grouping)MemberwiseClone();

            grouping.m_isClone = true;
            grouping.m_ID      = context.GenerateID();
            grouping.m_owner   = owner;
            if (DomainScope != null)
            {
                grouping.DomainScope = context.GetNewScopeName(DomainScope);
                if (string.CompareOrdinal(DomainScope, grouping.DomainScope) != 0)
                {
                    context.DomainScopeGroups.Add(grouping);
                }
                else
                {
                    grouping.m_scopeIDForDomainScope = Owner.DataScopeInfo.ScopeID;
                }
            }
            context.AddAggregateHolder(grouping);
            Global.Tracer.Assert(m_name != null);
            grouping.m_name = context.CreateAndRegisterUniqueGroupName(m_name, m_isClone);
            context.AddSortTarget(grouping.m_name, grouping);
            CloneGroupExpressions(context, grouping);
            if (m_groupLabel != null)
            {
                grouping.m_groupLabel = (ExpressionInfo)m_groupLabel.PublishClone(context);
            }
            if (m_sortDirections != null)
            {
                grouping.m_sortDirections = new List <bool>(m_sortDirections.Count);
                foreach (bool sortDirection in m_sortDirections)
                {
                    grouping.m_sortDirections.Add(sortDirection);
                }
            }
            grouping.m_aggregates          = new List <DataAggregateInfo>();
            grouping.m_recursiveAggregates = new List <DataAggregateInfo>();
            grouping.m_postSortAggregates  = new List <DataAggregateInfo>();
            if (m_filters != null)
            {
                grouping.m_filters = new List <Filter>(m_filters.Count);
                foreach (Filter filter in m_filters)
                {
                    grouping.m_filters.Add((Filter)filter.PublishClone(context));
                }
            }
            if (m_parent != null)
            {
                grouping.m_parent = new List <ExpressionInfo>(m_parent.Count);
                foreach (ExpressionInfo item in m_parent)
                {
                    grouping.m_parent.Add((ExpressionInfo)item.PublishClone(context));
                }
            }
            if (m_dataElementName != null)
            {
                grouping.m_dataElementName = (string)m_dataElementName.Clone();
            }
            if (m_userSortExpressions != null)
            {
                grouping.m_userSortExpressions = new List <ExpressionInfo>(m_userSortExpressions.Count);
                foreach (ExpressionInfo userSortExpression in m_userSortExpressions)
                {
                    grouping.m_userSortExpressions.Add((ExpressionInfo)userSortExpression.PublishClone(context));
                }
            }
            if (m_variables != null)
            {
                grouping.m_variables = new List <Variable>(m_variables.Count);
                foreach (Variable variable in m_variables)
                {
                    grouping.m_variables.Add((Variable)variable.PublishClone(context));
                }
            }
            if (m_nonDetailSortFiltersInScope != null)
            {
                grouping.m_nonDetailSortFiltersInScope = new InScopeSortFilterHashtable(m_nonDetailSortFiltersInScope.Count);
                foreach (DictionaryEntry item2 in m_nonDetailSortFiltersInScope)
                {
                    List <int> obj  = (List <int>)item2.Value;
                    List <int> list = new List <int>(obj.Count);
                    foreach (int item3 in obj)
                    {
                        list.Add(item3);
                    }
                    grouping.m_nonDetailSortFiltersInScope.Add(item2.Key, list);
                }
            }
            if (m_detailSortFiltersInScope != null)
            {
                grouping.m_detailSortFiltersInScope = new InScopeSortFilterHashtable(m_detailSortFiltersInScope.Count);
                foreach (DictionaryEntry item4 in m_detailSortFiltersInScope)
                {
                    List <int> obj2  = (List <int>)item4.Value;
                    List <int> list2 = new List <int>(obj2.Count);
                    foreach (int item5 in obj2)
                    {
                        list2.Add(item5);
                    }
                    grouping.m_detailSortFiltersInScope.Add(item4.Key, list2);
                }
            }
            if (m_pageBreak != null)
            {
                grouping.m_pageBreak = (PageBreak)m_pageBreak.PublishClone(context);
            }
            if (m_pageName != null)
            {
                grouping.m_pageName = (ExpressionInfo)m_pageName.PublishClone(context);
            }
            return(grouping);
        }