Beispiel #1
0
        internal RuntimeSortHierarchyObj(IHierarchyObj outerHierarchy, int depth)
        {
            m_hierarchyRoot = outerHierarchy.HierarchyRoot;
            m_odpContext    = m_hierarchyRoot.Value().OdpContext;
            List <int> sortFilterInfoIndices = m_hierarchyRoot.Value().SortFilterInfoIndices;
            int        num = outerHierarchy.ExpressionIndex + 1;

            if (sortFilterInfoIndices == null || num >= sortFilterInfoIndices.Count)
            {
                RuntimeDataTablixGroupRootObjReference runtimeDataTablixGroupRootObjReference = m_hierarchyRoot as RuntimeDataTablixGroupRootObjReference;
                if (null != runtimeDataTablixGroupRootObjReference)
                {
                    using (runtimeDataTablixGroupRootObjReference.PinValue())
                    {
                        RuntimeDataTablixGroupRootObj runtimeDataTablixGroupRootObj = runtimeDataTablixGroupRootObjReference.Value();
                        m_dataHolder = (IReference <ISortDataHolder>)runtimeDataTablixGroupRootObj.CreateGroupLeaf();
                        if (!runtimeDataTablixGroupRootObj.HasParent)
                        {
                            runtimeDataTablixGroupRootObj.AddChildWithNoParent((RuntimeGroupLeafObjReference)m_dataHolder);
                        }
                    }
                }
                else
                {
                    m_dataRowHolder = new RuntimeSortDataHolder();
                }
            }
            else
            {
                m_sortHierarchyStruct = new SortHierarchyStructure(this, num, m_odpContext.RuntimeSortFilterInfo, sortFilterInfoIndices);
            }
        }
Beispiel #2
0
        private RuntimeDataTablixMemberObj(IReference <IScope> owner, Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode dynamicMember, ref DataActions dataAction, OnDemandProcessingContext odpContext, IReference <RuntimeMemberObj>[] innerGroupings, HierarchyNodeList staticMembers, bool outerMostStatics, int headingLevel, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
            : base(owner, dynamicMember)
        {
            int excludedCellIndex = -1;

            if (dynamicMember != null)
            {
                excludedCellIndex = dynamicMember.MemberCellIndex;
                RuntimeDataTablixGroupRootObj runtimeDataTablixGroupRootObj = new RuntimeDataTablixGroupRootObj(owner, dynamicMember, ref dataAction, odpContext, innerGroupings, outerMostStatics, headingLevel, objectType);
                m_groupRoot = (RuntimeDataTablixGroupRootObjReference)runtimeDataTablixGroupRootObj.SelfReference;
                m_groupRoot.UnPinValue();
            }
            if (staticMembers != null && staticMembers.Count != 0)
            {
                _ = staticMembers.Count;
                m_hasStaticMembers      = true;
                m_staticLeafCellIndexes = staticMembers.GetLeafCellIndexes(excludedCellIndex);
            }
        }
Beispiel #3
0
        protected bool AddRunningValues(List <Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo> runningValues, ref List <string> runningValuesInGroup, ref List <string> previousValuesInGroup, Dictionary <string, IReference <RuntimeGroupRootObj> > groupCollection, bool cellRunningValues, bool outermostStatics)
        {
            bool result = false;

            if (runningValues == null || 0 >= runningValues.Count)
            {
                return(result);
            }
            if (runningValuesInGroup == null)
            {
                runningValuesInGroup = new List <string>();
            }
            if (previousValuesInGroup == null)
            {
                previousValuesInGroup = new List <string>();
            }
            if (cellRunningValues)
            {
                List <int> list  = null;
                List <int> list2 = null;
                Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef = m_hierarchyDef.DataRegionDef;
                bool isColumn = m_hierarchyDef.IsColumn;
                RuntimeDataTablixGroupRootObj runtimeDataTablixGroupRootObj = this as RuntimeDataTablixGroupRootObj;
                if (outermostStatics && ((runtimeDataTablixGroupRootObj != null && runtimeDataTablixGroupRootObj.InnerGroupings != null) || dataRegionDef.CurrentOuterGroupRoot == null))
                {
                    if (isColumn)
                    {
                        list2 = m_hierarchyDef.GetCellIndexes();
                        list  = dataRegionDef.OutermostStaticRowIndexes;
                    }
                    else
                    {
                        list2 = dataRegionDef.OutermostStaticColumnIndexes;
                        list  = m_hierarchyDef.GetCellIndexes();
                    }
                }
                else
                {
                    Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode hierarchyDef = dataRegionDef.CurrentOuterGroupRoot.Value().HierarchyDef;
                    if (isColumn)
                    {
                        list2 = m_hierarchyDef.GetCellIndexes();
                        list  = ((!outermostStatics) ? hierarchyDef.GetCellIndexes() : dataRegionDef.OutermostStaticRowIndexes);
                    }
                    else
                    {
                        list  = m_hierarchyDef.GetCellIndexes();
                        list2 = ((!outermostStatics) ? hierarchyDef.GetCellIndexes() : dataRegionDef.OutermostStaticColumnIndexes);
                    }
                }
                if (list != null && list2 != null)
                {
                    foreach (int item in list)
                    {
                        foreach (int item2 in list2)
                        {
                            Cell cell = dataRegionDef.Rows[item].Cells[item2];
                            if (cell.RunningValueIndexes != null)
                            {
                                result = true;
                                for (int i = 0; i < cell.RunningValueIndexes.Count; i++)
                                {
                                    int index = cell.RunningValueIndexes[i];
                                    AddRunningValue(runningValues[index], runningValuesInGroup, previousValuesInGroup, groupCollection);
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                result = true;
                for (int j = 0; j < runningValues.Count; j++)
                {
                    AddRunningValue(runningValues[j], runningValuesInGroup, previousValuesInGroup, groupCollection);
                }
            }
            if (previousValuesInGroup.Count == 0)
            {
                previousValuesInGroup = null;
            }
            if (runningValuesInGroup.Count == 0)
            {
                runningValuesInGroup = null;
            }
            return(result);
        }
Beispiel #4
0
		private RuntimeCell GetOrCreateCellByIndex(int groupLeafIndex, Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, IReference<RuntimeDataTablixGroupLeafObj> ownerRef, RuntimeDataTablixGroupRootObj currOuterGroupRoot, out IDisposable cleanupRef)
		{
			RuntimeCell andPinCell = GetAndPinCell(groupLeafIndex, out cleanupRef);
			if (andPinCell == null)
			{
				using (ownerRef.PinValue())
				{
					RuntimeDataTablixGroupLeafObj runtimeDataTablixGroupLeafObj = ownerRef.Value();
					if (!RuntimeCell.HasOnlySimpleGroupTreeCells(currOuterGroupRoot.HierarchyDef, runtimeDataTablixGroupLeafObj.MemberDef, dataRegionDef))
					{
						runtimeDataTablixGroupLeafObj.CreateCell(this, groupLeafIndex, currOuterGroupRoot.HierarchyDef, runtimeDataTablixGroupLeafObj.MemberDef, dataRegionDef);
					}
				}
				andPinCell = GetAndPinCell(groupLeafIndex, out cleanupRef);
			}
			return andPinCell;
		}
Beispiel #5
0
		internal RuntimeCell GetOrCreateCell(Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, IReference<RuntimeDataTablixGroupLeafObj> ownerRef, IReference<RuntimeDataTablixGroupRootObj> currOuterGroupRootRef, int groupLeafIndex, out IDisposable cleanupRef)
		{
			RuntimeDataTablixGroupRootObj currOuterGroupRoot = currOuterGroupRootRef.Value();
			return GetOrCreateCellByIndex(groupLeafIndex, dataRegionDef, ownerRef, currOuterGroupRoot, out cleanupRef);
		}
Beispiel #6
0
		internal RuntimeCell GetOrCreateCell(Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, IReference<RuntimeDataTablixGroupLeafObj> ownerRef, IReference<RuntimeDataTablixGroupRootObj> currOuterGroupRootRef, out IDisposable cleanupRef)
		{
			RuntimeDataTablixGroupRootObj runtimeDataTablixGroupRootObj = currOuterGroupRootRef.Value();
			int groupLeafIndex = dataRegionDef.OuterGroupingIndexes[runtimeDataTablixGroupRootObj.HierarchyDef.HierarchyDynamicIndex];
			return GetOrCreateCellByIndex(groupLeafIndex, dataRegionDef, ownerRef, runtimeDataTablixGroupRootObj, out cleanupRef);
		}