예제 #1
0
 public void CalculateAndStoreReportVariables(OnDemandProcessingContext odpContext)
 {
     if (odpContext.ReportDefinition.Variables != null && this.m_variables == null)
     {
         ScopeInstance.CalculateVariables(odpContext, odpContext.ReportDefinition.Variables, out this.m_variables);
     }
 }
예제 #2
0
 public void ResetReportVariables(OnDemandProcessingContext odpContext)
 {
     if (odpContext.ReportDefinition.Variables != null)
     {
         ScopeInstance.ResetVariables(odpContext, odpContext.ReportDefinition.Variables);
     }
 }
예제 #3
0
        public static IReference <SubReportInstance> CreateInstance(ScopeInstance parentInstance, SubReport subReport, OnDemandMetadata odpMetadata)
        {
            SubReportInstance subReportInstance      = new SubReportInstance(subReport, odpMetadata);
            IReference <SubReportInstance> reference = odpMetadata.GroupTreeScalabilityCache.AllocateAndPin(subReportInstance, 0);

            subReportInstance.m_cleanupRef = (IDisposable)reference;
            parentInstance.AddChildScope((IReference <ScopeInstance>)reference, subReport.IndexInCollection);
            return(reference);
        }
예제 #4
0
        public void SetupAggregates <AggregateType>(OnDemandProcessingContext odpContext, List <AggregateType> aggregateDefs, List <int> aggregateIndexes, ref int aggregateValueOffset) where AggregateType : DataAggregateInfo
        {
            int num = (aggregateIndexes != null) ? aggregateIndexes.Count : 0;

            for (int i = 0; i < num; i++)
            {
                int index = aggregateIndexes[i];
                ScopeInstance.SetupAggregate(odpContext, aggregateDefs[index], this.m_aggregateValues[aggregateValueOffset]);
                aggregateValueOffset++;
            }
        }
예제 #5
0
 public void SetupAggregates <AggregateType>(OnDemandProcessingContext odpContext, BucketedAggregatesCollection <AggregateType> aggregateDefs, ref int aggregateValueOffset) where AggregateType : DataAggregateInfo
 {
     if (this.m_aggregateValues != null && aggregateDefs != null)
     {
         foreach (AggregateType aggregateDef in aggregateDefs)
         {
             ScopeInstance.SetupAggregate(odpContext, aggregateDef, this.m_aggregateValues[aggregateValueOffset]);
             aggregateValueOffset++;
         }
     }
 }
예제 #6
0
 public void SetupAggregates <AggregateType>(OnDemandProcessingContext odpContext, List <AggregateType> aggregateDefs, ref int aggregateValueOffset) where AggregateType : DataAggregateInfo
 {
     if (this.m_aggregateValues != null && aggregateDefs != null)
     {
         int count = aggregateDefs.Count;
         for (int i = 0; i < count; i++)
         {
             ScopeInstance.SetupAggregate(odpContext, aggregateDefs[i], this.m_aggregateValues[aggregateValueOffset]);
             aggregateValueOffset++;
         }
     }
 }
        public static IDisposable AddCellInstance(ScalableList <DataCellInstanceList> cells, int columnMemberSequenceId, int cellIndexInCollection, DataCellInstance cellInstance, IScalabilityCache cache)
        {
            ScopeInstance.AdjustLength(cells, columnMemberSequenceId);
            DataCellInstanceList dataCellInstanceList = default(DataCellInstanceList);
            IDisposable          andPin = cells.GetAndPin(columnMemberSequenceId, out dataCellInstanceList);

            if (dataCellInstanceList == null)
            {
                dataCellInstanceList = (cells[columnMemberSequenceId] = new DataCellInstanceList());
            }
            ListUtils.AdjustLength(dataCellInstanceList, cellIndexInCollection);
            ((List <DataCellInstance>)dataCellInstanceList)[cellIndexInCollection] = cellInstance;
            return(andPin);
        }
예제 #8
0
 public void StoreAggregates <AggregateType>(OnDemandProcessingContext odpContext, BucketedAggregatesCollection <AggregateType> aggregateDefs) where AggregateType : DataAggregateInfo
 {
     if (aggregateDefs != null && !aggregateDefs.IsEmpty)
     {
         if (this.m_aggregateValues == null)
         {
             this.m_aggregateValues = new List <DataAggregateObjResult>();
         }
         foreach (AggregateType aggregateDef in aggregateDefs)
         {
             ScopeInstance.StoreAggregate <AggregateType>(odpContext, aggregateDef, ref this.m_aggregateValues);
         }
     }
 }
예제 #9
0
 private static void TraceScopeInstance(ScopeInstance scopeInstance, int level)
 {
     Global.Tracer.Assert(null != scopeInstance, "(null != scopeInstance)");
     if (0 < scopeInstance.FirstRowOffset)
     {
         Global.Tracer.Trace("{0}FirstRowOffset={1}", GroupTreeTracer.GetEmptyString(level), scopeInstance.FirstRowOffset);
     }
     if (scopeInstance.AggregateValues != null && scopeInstance.AggregateValues.Count != 0)
     {
         StringBuilder stringBuilder = new StringBuilder(GroupTreeTracer.GetEmptyString(level));
         stringBuilder.Append("Aggregates=");
         foreach (DataAggregateObjResult aggregateValue in scopeInstance.AggregateValues)
         {
             if (aggregateValue == null)
             {
                 stringBuilder.Append("(NULL)");
             }
             else
             {
                 stringBuilder.Append(aggregateValue.Value);
             }
             stringBuilder.Append("#");
         }
         Global.Tracer.Trace(stringBuilder.ToString());
     }
     if (scopeInstance.SubreportInstances != null && scopeInstance.SubreportInstances.Count != 0)
     {
         int count = scopeInstance.SubreportInstances.Count;
         Global.Tracer.Trace("{0}{1} SubReportInstances:", GroupTreeTracer.GetEmptyString(level), count);
         for (int i = 0; i < count; i++)
         {
             if (scopeInstance.SubreportInstances[i] != null)
             {
                 GroupTreeTracer.TraceSubReportInstance(scopeInstance.SubreportInstances[i].Value(), level + 1);
             }
         }
     }
     if (scopeInstance.DataRegionInstances != null && scopeInstance.DataRegionInstances.Count != 0)
     {
         int count2 = scopeInstance.DataRegionInstances.Count;
         Global.Tracer.Trace("{0}{1} DataRegionInstances:", GroupTreeTracer.GetEmptyString(level), count2);
         for (int j = 0; j < count2; j++)
         {
             if (scopeInstance.DataRegionInstances[j] != null)
             {
                 GroupTreeTracer.TraceDataRegionInstance(scopeInstance.DataRegionInstances[j].Value(), level + 1);
             }
         }
     }
 }
예제 #10
0
 public void StoreAggregates <AggregateType>(OnDemandProcessingContext odpContext, List <AggregateType> aggregateDefs) where AggregateType : DataAggregateInfo
 {
     if (aggregateDefs != null)
     {
         int count = aggregateDefs.Count;
         if (this.m_aggregateValues == null)
         {
             this.m_aggregateValues = new List <DataAggregateObjResult>();
         }
         for (int i = 0; i < count; i++)
         {
             ScopeInstance.StoreAggregate <AggregateType>(odpContext, aggregateDefs[i], ref this.m_aggregateValues);
         }
     }
 }
예제 #11
0
 public void SetupEnvironment(OnDemandProcessingContext odpContext)
 {
     if (this.m_dataSetInstances == null)
     {
         this.InitDataSetInstances(odpContext);
     }
     for (int i = 0; i < this.m_dataSetInstances.Length; i++)
     {
         DataSetInstance dataSetInstance = this.GetDataSetInstance(i, odpContext);
         if (dataSetInstance != null)
         {
             dataSetInstance.SetupDataSetLevelAggregates(odpContext);
         }
     }
     if (this.m_variables != null)
     {
         ScopeInstance.SetupVariables(odpContext, odpContext.ReportDefinition.Variables, this.m_variables);
     }
 }
        public static IReference <DataRegionInstance> CreateInstance(ScopeInstance parentInstance, OnDemandMetadata odpMetadata, DataRegion dataRegionDef, int dataSetIndex)
        {
            DataRegionInstance              dataRegionInstance        = new DataRegionInstance(dataRegionDef, dataSetIndex);
            GroupTreeScalabilityCache       groupTreeScalabilityCache = odpMetadata.GroupTreeScalabilityCache;
            IReference <DataRegionInstance> reference;

            if (parentInstance.ObjectType == AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.ReportInstance)
            {
                ReportInstance reportInstance = (ReportInstance)parentInstance;
                reference = reportInstance.GetTopLevelDataRegionReference(dataRegionDef.IndexInCollection);
                groupTreeScalabilityCache.SetTreePartitionContentsAndPin(reference, dataRegionInstance);
            }
            else
            {
                reference = groupTreeScalabilityCache.AllocateAndPin(dataRegionInstance, 0);
                parentInstance.AddChildScope((IReference <ScopeInstance>)reference, dataRegionDef.IndexInCollection);
            }
            dataRegionInstance.m_cleanupRef = (IDisposable)reference;
            return(reference);
        }
        public void SetupEnvironment(OnDemandProcessingContext odpContext, int dataSetIndex)
        {
            base.SetupFields(odpContext, dataSetIndex);
            int num = 0;

            base.SetupAggregates(odpContext, this.m_memberDef.Grouping.Aggregates, ref num);
            base.SetupAggregates(odpContext, this.m_memberDef.Grouping.RecursiveAggregates, ref num);
            base.SetupAggregates(odpContext, this.m_memberDef.Grouping.PostSortAggregates, ref num);
            base.SetupAggregates(odpContext, this.m_memberDef.RunningValues, ref num);
            if (this.m_memberDef.DataScopeInfo != null)
            {
                DataScopeInfo dataScopeInfo = this.m_memberDef.DataScopeInfo;
                base.SetupAggregates(odpContext, dataScopeInfo.AggregatesOfAggregates, ref num);
                base.SetupAggregates(odpContext, dataScopeInfo.PostSortAggregatesOfAggregates, ref num);
                base.SetupAggregates(odpContext, dataScopeInfo.RunningValuesOfAggregates, ref num);
            }
            if (this.m_variables != null)
            {
                ScopeInstance.SetupVariables(odpContext, this.m_memberDef.Grouping.Variables, this.m_variables);
            }
        }
 IList <DataRegionMemberInstance> IMemberHierarchy.GetChildMemberInstances(bool isRowMember, int memberIndexInCollection)
 {
     return(ScopeInstance.GetChildMemberInstances(isRowMember ? this.m_rowMembers : this.m_columnMembers, memberIndexInCollection));
 }
 IList <DataRegionMemberInstance> IMemberHierarchy.GetChildMemberInstances(bool isRowMember, int memberIndexInCollection)
 {
     return(ScopeInstance.GetChildMemberInstances(this.m_children, memberIndexInCollection));
 }