public override bool CalculateAggregate(string aggregateName)
        {
            OnDemandProcessingContext odpWorkerContextForTablixProcessing = base.GetOdpWorkerContextForTablixProcessing();

            AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo dataAggregateInfo = default(AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo);
            odpWorkerContextForTablixProcessing.ReportAggregates.TryGetValue(aggregateName, out dataAggregateInfo);
            if (dataAggregateInfo == null)
            {
                return(false);
            }
            AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet         dataSet         = base.m_odpContext.ReportDefinition.MappingDataSetIndexToDataSet[dataAggregateInfo.DataSetIndexInCollection];
            AspNetCore.ReportingServices.ReportIntermediateFormat.DataSetInstance dataSetInstance = odpWorkerContextForTablixProcessing.GetDataSetInstance(dataSet);
            if (dataSetInstance != null)
            {
                bool flag = odpWorkerContextForTablixProcessing.IsTablixProcessingComplete(dataSet.IndexInCollection);
                if (!flag)
                {
                    if (odpWorkerContextForTablixProcessing.IsTablixProcessingMode)
                    {
                        return(false);
                    }
                    OnDemandStateManagerFull onDemandStateManagerFull = (OnDemandStateManagerFull)odpWorkerContextForTablixProcessing.StateManager;
                    onDemandStateManagerFull.PerformOnDemandTablixProcessingWithContextRestore(dataSet);
                }
                if (flag || base.m_odpContext.IsPageHeaderFooter)
                {
                    dataSetInstance.SetupDataSetLevelAggregates(base.m_odpContext);
                }
                return(true);
            }
            return(false);
        }
示例#2
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);
     }
 }