public override object PublishClone(AutomaticSubtotalContext context)
        {
            RunningValueInfo runningValueInfo = (RunningValueInfo)base.PublishClone(context);

            runningValueInfo.m_scope = context.GetNewScopeName(this.m_scope);
            return(runningValueInfo);
        }
 private static void SetupRunningValues(OnDemandProcessingContext odpContext, ref int startIndex, List <AspNetCore.ReportingServices.ReportIntermediateFormat.RunningValueInfo> rvDefs, AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] rvValues)
 {
     if (rvDefs != null && rvValues != null)
     {
         AggregatesImpl aggregatesImpl = odpContext.ReportObjectModel.AggregatesImpl;
         for (int i = 0; i < rvDefs.Count; i++)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.RunningValueInfo runningValueInfo = rvDefs[i];
             aggregatesImpl.Set(runningValueInfo.Name, runningValueInfo, runningValueInfo.DuplicateNames, rvValues[startIndex + i]);
         }
         startIndex += rvDefs.Count;
     }
 }
 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;
     }
 }
Exemplo n.º 4
0
        public override DataAggregate ConstructAggregator(OnDemandProcessingContext odpContext, DataAggregateInfo aggregateDef)
        {
            RunningValueInfo runningValueInfo = (RunningValueInfo)aggregateDef;

            return(new Previous(odpContext, runningValueInfo.TotalGroupingExpressionCount, runningValueInfo.IsScopedInEvaluationScope, string.IsNullOrEmpty(runningValueInfo.Scope)));
        }
 public static void AddRunningValues(OnDemandProcessingContext odpContext, List <AspNetCore.ReportingServices.ReportIntermediateFormat.RunningValueInfo> runningValues, ref List <string> runningValuesInGroup, ref List <string> previousValuesInGroup, Dictionary <string, IReference <RuntimeGroupRootObj> > groupCollection, IReference <RuntimeGroupRootObj> lastGroup)
 {
     if (runningValues != null && 0 < runningValues.Count)
     {
         if (runningValuesInGroup == null)
         {
             runningValuesInGroup = new List <string>();
         }
         if (previousValuesInGroup == null)
         {
             previousValuesInGroup = new List <string>();
         }
         AggregatesImpl aggregatesImpl = odpContext.ReportObjectModel.AggregatesImpl;
         for (int i = 0; i < runningValues.Count; i++)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.RunningValueInfo runningValueInfo = runningValues[i];
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = aggregatesImpl.GetAggregateObj(runningValueInfo.Name);
             if (dataAggregateObj == null)
             {
                 dataAggregateObj = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj(runningValueInfo, odpContext);
                 aggregatesImpl.Add(dataAggregateObj);
             }
             if (runningValueInfo.Scope != null)
             {
                 IReference <RuntimeGroupRootObj> reference = default(IReference <RuntimeGroupRootObj>);
                 if (groupCollection.TryGetValue(runningValueInfo.Scope, out reference))
                 {
                     using (reference.PinValue())
                     {
                         reference.Value().AddScopedRunningValue(dataAggregateObj);
                     }
                 }
                 else
                 {
                     Global.Tracer.Assert(false);
                 }
             }
             if (runningValueInfo.AggregateType == AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Previous)
             {
                 previousValuesInGroup.Add(dataAggregateObj.Name);
             }
             else
             {
                 runningValuesInGroup.Add(dataAggregateObj.Name);
             }
         }
     }
 }