Пример #1
0
        private static void StoreAggregate <AggregateType>(OnDemandProcessingContext odpContext, AggregateType aggregateDef, ref List <DataAggregateObjResult> aggregateValues) where AggregateType : DataAggregateInfo
        {
            DataAggregateObj       aggregateObj = odpContext.ReportObjectModel.AggregatesImpl.GetAggregateObj(aggregateDef.Name);
            DataAggregateObjResult item         = aggregateObj.AggregateResult();

            aggregateValues.Add(item);
        }
Пример #2
0
        public void DoneReadingRows(ref AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] runningValueValues, ref AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] runningValueOfAggregateValues, ref AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] cellRunningValueValues)
        {
            AggregatesImpl aggregatesImpl = base.m_odpContext.ReportObjectModel.AggregatesImpl;

            RuntimeRICollection.StoreRunningValues(aggregatesImpl, base.m_hierarchyDef.RunningValues, ref runningValueValues);
            if (base.m_hierarchyDef.DataScopeInfo != null)
            {
                RuntimeRICollection.StoreRunningValues(aggregatesImpl, base.m_hierarchyDef.DataScopeInfo.RunningValuesOfAggregates, ref runningValueOfAggregateValues);
            }
            int num  = (this.m_staticCellPreviousValues != null) ? this.m_staticCellPreviousValues.Count : 0;
            int num2 = (this.m_staticCellRVs != null) ? this.m_staticCellRVs.Count : 0;

            if (num2 > 0)
            {
                cellRunningValueValues = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[num2 + num];
                for (int i = 0; i < num2; i++)
                {
                    AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(this.m_staticCellRVs[i]);
                    cellRunningValueValues[i] = aggregateObj.AggregateResult();
                }
            }
            if (num > 0)
            {
                if (cellRunningValueValues == null)
                {
                    cellRunningValueValues = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[num];
                }
                for (int j = 0; j < num; j++)
                {
                    AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj2 = aggregatesImpl.GetAggregateObj(this.m_staticCellPreviousValues[j]);
                    cellRunningValueValues[num2 + j] = aggregateObj2.AggregateResult();
                }
            }
        }
 public static void StoreRunningValues(AggregatesImpl globalRVCol, List <AspNetCore.ReportingServices.ReportIntermediateFormat.RunningValueInfo> runningValues, ref AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] runningValueValues)
 {
     if (runningValues != null && 0 < runningValues.Count)
     {
         if (runningValueValues == null)
         {
             runningValueValues = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[runningValues.Count];
         }
         for (int i = 0; i < runningValues.Count; i++)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.RunningValueInfo runningValueInfo = runningValues[i];
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj     = globalRVCol.GetAggregateObj(runningValueInfo.Name);
             if (aggregateObj != null)
             {
                 runningValueValues[i] = aggregateObj.AggregateResult();
             }
         }
     }
     else
     {
         runningValueValues = null;
     }
 }
 protected void SetupAggregates(List <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj> aggregates)
 {
     if (aggregates != null)
     {
         for (int i = 0; i < aggregates.Count; i++)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = aggregates[i];
             this.m_odpContext.ReportObjectModel.AggregatesImpl.Set(dataAggregateObj.Name, dataAggregateObj.AggregateDef, dataAggregateObj.DuplicateNames, dataAggregateObj.AggregateResult());
         }
     }
 }
 public static void UpdateAggregates(OnDemandProcessingContext odpContext, List <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj> aggregates, bool updateAndSetup)
 {
     if (aggregates != null)
     {
         for (int i = 0; i < aggregates.Count; i++)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = aggregates[i];
             dataAggregateObj.Update();
             if (updateAndSetup)
             {
                 odpContext.ReportObjectModel.AggregatesImpl.Set(dataAggregateObj.Name, dataAggregateObj.AggregateDef, dataAggregateObj.DuplicateNames, dataAggregateObj.AggregateResult());
             }
         }
     }
 }
        private object GetAggregateValue(string key, AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj)
        {
            aggregateObj.UsedInExpression = true;
            AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult dataAggregateObjResult = aggregateObj.AggregateResult();
            if (dataAggregateObjResult == null)
            {
                Global.Tracer.Assert(this.m_odpContext.IsTablixProcessingMode, "Missing aggregate result outside of tablix processing");
                throw new ReportProcessingException_MissingAggregateDependency();
            }
            if (dataAggregateObjResult.HasCode)
            {
                if ((dataAggregateObjResult.FieldStatus == DataFieldStatus.None || dataAggregateObjResult.FieldStatus == DataFieldStatus.IsError) && dataAggregateObjResult.Code != 0)
                {
                    this.ErrorContext.Register(dataAggregateObjResult.Code, dataAggregateObjResult.Severity, dataAggregateObjResult.Arguments);
                    goto IL_0091;
                }
                if (dataAggregateObjResult.FieldStatus == DataFieldStatus.UnSupportedDataType)
                {
                    this.ErrorContext.Register(ProcessingErrorCode.rsAggregateOfInvalidExpressionDataType, Severity.Warning, dataAggregateObjResult.Arguments);
                }
                goto IL_0091;
            }
            goto IL_009f;
IL_009f:
            if (dataAggregateObjResult.ErrorOccurred)
            {
                throw new ReportProcessingException(ErrorCode.rsInvalidOperation);
            }
            return(dataAggregateObjResult.Value);

IL_0091:
            if (dataAggregateObjResult.ErrorOccurred)
            {
                throw new ReportProcessingException_InvalidOperationException();
            }
            goto IL_009f;
        }