コード例 #1
0
 public void Remove(AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo aggDef)
 {
     try
     {
         if (this.m_lockAdd)
         {
             Monitor.Enter(this.m_collection);
         }
         if (this.m_collection != null)
         {
             this.m_collection.Remove(aggDef.Name);
             List <string> duplicateNames = aggDef.DuplicateNames;
             if (this.m_duplicateNames != null && duplicateNames != null)
             {
                 for (int i = 0; i < duplicateNames.Count; i++)
                 {
                     this.m_duplicateNames.Remove(duplicateNames[i]);
                 }
             }
         }
     }
     finally
     {
         if (this.m_lockAdd)
         {
             Monitor.Exit(this.m_collection);
         }
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void Set(string name, AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo aggregateDef, List <string> duplicateNames, AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult aggregateResult)
 {
     AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = this.GetAggregateObj(name);
     if (aggregateObj == null)
     {
         try
         {
             if (this.m_lockAdd)
             {
                 Monitor.Enter(this.m_collection);
             }
             aggregateObj = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj(aggregateDef, aggregateResult);
             this.m_collection.Add(name, aggregateObj);
             this.PopulateDuplicateNames(name, duplicateNames);
         }
         finally
         {
             if (this.m_lockAdd)
             {
                 Monitor.Exit(this.m_collection);
             }
         }
     }
     else
     {
         aggregateObj.Set(aggregateResult);
     }
 }
コード例 #4
0
 private void ProcessAggregateParam(AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo aggregate, ExpressionParser.ExpressionContext context)
 {
     if (aggregate != null && aggregate.Expressions != null)
     {
         for (int i = 0; i < aggregate.Expressions.Length; i++)
         {
             this.ProcessAggregateParam(aggregate.Expressions[i], context);
         }
     }
 }
コード例 #5
0
 public void Reset(AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo aggregateDef)
 {
     if (this.m_collection != null)
     {
         AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = this.GetAggregateObj(aggregateDef.Name);
         if (aggregateObj != null)
         {
             aggregateObj.ResetForNoRows();
         }
     }
 }
コード例 #6
0
 public ExpressionContext(ExpressionType expressionType, DataType constantType, AspNetCore.ReportingServices.ReportPublishing.LocationFlags location, ObjectType objectType, string objectName, string propertyName, string dataSetName, int maxExpressionLength, PublishingContextBase publishingContext)
 {
     this.m_expressionType      = expressionType;
     this.m_constantType        = constantType;
     this.m_location            = location;
     this.m_objectType          = objectType;
     this.m_objectName          = objectName;
     this.m_propertyName        = propertyName;
     this.m_dataSetName         = dataSetName;
     this.m_inPrevious          = false;
     this.m_inLookup            = false;
     this.m_maxExpressionLength = maxExpressionLength;
     this.m_outerAggregate      = null;
     this.m_publishingContext   = publishingContext;
 }
コード例 #7
0
 public AutomaticSubtotalContext(AspNetCore.ReportingServices.ReportIntermediateFormat.Report report, List <ICreateSubtotals> createSubtotals, List <AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping> domainScopeGroups, NameValidator reportItemNameValidator, NameValidator scopeNameValidator, NameValidator variableNameValidator, Dictionary <string, AspNetCore.ReportingServices.ReportIntermediateFormat.ISortFilterScope> reportScopes, List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItemCollection> reportItemCollections, List <AspNetCore.ReportingServices.ReportIntermediateFormat.IAggregateHolder> aggregateHolders, List <AspNetCore.ReportingServices.ReportIntermediateFormat.IRunningValueHolder> runningValueHolders, Holder <int> variableSequenceIdCounter, Holder <int> textboxSequenceIdCounter, ScopeTree scopeTree)
 {
     this.m_createSubtotals         = createSubtotals;
     this.m_domainScopeGroups       = domainScopeGroups;
     this.m_reportItemNameValidator = reportItemNameValidator;
     this.m_scopeNameValidator      = scopeNameValidator;
     this.m_variableNameValidator   = variableNameValidator;
     this.m_report = report;
     this.m_variableSequenceIdCounter        = variableSequenceIdCounter;
     this.m_textboxSequenceIdCounter         = textboxSequenceIdCounter;
     this.m_dynamicWithStaticPeerEncountered = false;
     this.m_location          = LocationFlags.None;
     this.m_objectName        = null;
     this.m_objectType        = ObjectType.Tablix;
     this.m_currentDataRegion = null;
     this.m_cellLists         = null;
     this.m_tablixColumns     = null;
     this.m_rows                                = null;
     this.m_scopeNameMap                        = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_reportItemNameMap                   = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_aggregateMap                        = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_lookupMap                           = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_variableNameMap                     = new Dictionary <string, string>(StringComparer.Ordinal);
     this.m_currentScope                        = null;
     this.m_currentScopeBeingCloned             = null;
     this.m_startIndex                          = new Holder <int>();
     this.m_currentIndex                        = new Holder <int>();
     this.m_headerLevel                         = 0;
     this.m_originalColumnCount                 = 0;
     this.m_originalRowCount                    = 0;
     this.m_reportScopes                        = reportScopes;
     this.m_reportItemCollections               = reportItemCollections;
     this.m_aggregateHolders                    = aggregateHolders;
     this.m_runningValueHolders                 = runningValueHolders;
     this.m_expressionsWithReportItemReferences = new List <AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo>();
     this.m_visibilitiesWithToggleToUpdate      = new List <AspNetCore.ReportingServices.ReportIntermediateFormat.Visibility>();
     this.m_reportItemsWithRepeatWithToUpdate   = new List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem>();
     this.m_endUserSortWithTarget               = new List <AspNetCore.ReportingServices.ReportIntermediateFormat.EndUserSort>();
     this.m_scopeNamesToClone                   = new Dictionary <string, IRIFDataScope>(StringComparer.Ordinal);
     this.m_headerLevelHasStaticArray           = null;
     this.m_currentDataRegionClone              = null;
     this.m_currentMapClone                     = null;
     this.m_outerAggregate                      = null;
     this.m_scopeTree                           = scopeTree;
     this.m_currentDataScope                    = null;
     this.m_currentMapVectorLayerClone          = null;
 }
コード例 #8
0
 private bool NeedsSubtotalScopeLift(AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo aggregate, IRIFDataScope displayScope)
 {
     if (aggregate.PublishingInfo.HasScope)
     {
         IRIFDataScope scopeByName = this.m_scopeTree.GetScopeByName(aggregate.PublishingInfo.Scope);
         if (scopeByName == null)
         {
             return(false);
         }
         if (this.m_scopeTree.IsParentScope(displayScope, scopeByName))
         {
             return(true);
         }
         return(false);
     }
     return(true);
 }
コード例 #9
0
        public string GetNewScopeNameForInnerOrOuterAggregate(AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo originalAggregate)
        {
            string        scope         = originalAggregate.PublishingInfo.Scope;
            IRIFDataScope iRIFDataScope = default(IRIFDataScope);

            if (this.m_scopeNamesToClone.TryGetValue(scope, out iRIFDataScope))
            {
                AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = iRIFDataScope as AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion;
                if (dataRegion != null)
                {
                    return(this.CreateUniqueReportItemName(scope, dataRegion.IsClone));
                }
                AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode reportHierarchyNode = iRIFDataScope as AspNetCore.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode;
                if (reportHierarchyNode != null)
                {
                    return(this.CreateAndRegisterUniqueGroupName(scope, reportHierarchyNode.IsClone));
                }
                Global.Tracer.Assert(false, "Unknown object type in GetNewScopeNameForNestedAggregate: {0}", iRIFDataScope);
                return(scope);
            }
            IRIFDataScope scopeByName = this.m_scopeTree.GetScopeByName(this.m_currentScope);
            int           num         = (scopeByName == null || !this.NeedsSubtotalScopeLift(originalAggregate, scopeByName)) ? (-1) : this.m_scopeTree.MeasureScopeDistance(this.m_currentScopeBeingCloned, this.m_currentScope);

            if (num <= 0)
            {
                return(scope);
            }
            string text = this.m_scopeTree.FindAncestorScopeName(scope, num);

            if (text == null)
            {
                return(scope);
            }
            if (this.m_outerAggregate != null && !string.IsNullOrEmpty(this.m_outerAggregate.PublishingInfo.Scope))
            {
                IRIFDataScope scopeByName2 = this.m_scopeTree.GetScopeByName(this.m_outerAggregate.PublishingInfo.Scope);
                IRIFDataScope scopeByName3 = this.m_scopeTree.GetScopeByName(text);
                if (scopeByName2 != null && scopeByName3 != null && this.m_scopeTree.IsParentScope(scopeByName3, scopeByName2))
                {
                    text = this.m_outerAggregate.PublishingInfo.Scope;
                }
            }
            return(text);
        }
コード例 #10
0
        public override bool CalculateAggregate(string aggregateName)
        {
            Global.Tracer.Assert(!base.m_odpContext.IsPageHeaderFooter, "Not supported for page header/footer in streaming mode");
            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];
            if (!odpWorkerContextForTablixProcessing.IsTablixProcessingComplete(dataSet.IndexInCollection))
            {
                if (odpWorkerContextForTablixProcessing.IsTablixProcessingMode)
                {
                    return(false);
                }
                DataSetAggregateDataPipelineManager pipeline = new DataSetAggregateDataPipelineManager(odpWorkerContextForTablixProcessing, dataSet);
                odpWorkerContextForTablixProcessing.OnDemandProcessDataPipelineWithRestore(pipeline);
            }
            return(true);
        }
コード例 #11
0
        public DataAggregate CreateAggregator(OnDemandProcessingContext odpContext, DataAggregateInfo aggregateDef)
        {
            DataAggregate prototype = this.GetPrototype(aggregateDef);

            return(prototype.ConstructAggregator(odpContext, aggregateDef));
        }
コード例 #12
0
 public static void CreateAggregates(OnDemandProcessingContext odpContext, List <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo> aggDefs, List <int> aggregateIndexes, ref List <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj> nonCustomAggregates, ref List <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj> customAggregates)
 {
     if (aggregateIndexes != null && 0 < aggregateIndexes.Count)
     {
         for (int i = 0; i < aggregateIndexes.Count; i++)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo dataAggregateInfo = aggDefs[aggregateIndexes[i]];
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj  aggregate         = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj(dataAggregateInfo, odpContext);
             if (AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Aggregate == dataAggregateInfo.AggregateType)
             {
                 RuntimeDataRegionObj.AddAggregate(ref customAggregates, aggregate);
             }
             else
             {
                 RuntimeDataRegionObj.AddAggregate(ref nonCustomAggregates, aggregate);
             }
         }
     }
 }
コード例 #13
0
 private DataAggregate GetPrototype(DataAggregateInfo aggregateDef)
 {
     return(this.m_prototypes[(int)aggregateDef.AggregateType]);
 }
コード例 #14
0
		private void PageInit(ReportSection section)
		{
			AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.ObjectModelImpl reportObjectModel = this.m_processingContext.ReportObjectModel;
			AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl aggregatesImpl = reportObjectModel.AggregatesImpl;
			Global.Tracer.Assert(section.BodyItemsForHeadFoot != null, "Missing cached BodyItemsForHeadFoot collection");
			Global.Tracer.Assert(section.PageSectionItemsForHeadFoot != null, "Missing cached PageSectionItemsForHeadFoot collection");
			section.BodyItemsForHeadFoot.ResetAll(default(AspNetCore.ReportingServices.RdlExpressions.VariantResult));
			section.PageSectionItemsForHeadFoot.ResetAll();
			reportObjectModel.GlobalsImpl.SetPageNumbers(base.m_currentPageNumber, base.m_totalPages, base.m_currentOverallPageNumber, base.m_overallTotalPages);
			reportObjectModel.GlobalsImpl.SetPageName(base.m_pageName);
			AspNetCore.ReportingServices.ReportIntermediateFormat.Report reportDef = base.m_romReport.ReportDef;
			AspNetCore.ReportingServices.ReportIntermediateFormat.ReportSection sectionDef = section.SectionDef;
			AspNetCore.ReportingServices.ReportIntermediateFormat.Page page = sectionDef.Page;
			section.PageAggregatesOverReportItems = new Dictionary<string, AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl>();
			this.m_processingContext.ReportObjectModel.ReportItemsImpl.SpecialMode = true;
			if (page.PageAggregates != null)
			{
				for (int i = 0; i < page.PageAggregates.Count; i++)
				{
					AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo dataAggregateInfo = page.PageAggregates[i];
					aggregatesImpl.Remove(dataAggregateInfo);
					dataAggregateInfo.ExprHostInitialized = false;
					AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj(dataAggregateInfo, this.m_processingContext);
					object[] array = default(object[]);
					DataFieldStatus dataFieldStatus = default(DataFieldStatus);
					dataAggregateObj.EvaluateParameters(out array, out dataFieldStatus);
					string specialModeIndex = reportObjectModel.ReportItemsImpl.GetSpecialModeIndex();
					if (specialModeIndex == null)
					{
						aggregatesImpl.Add(dataAggregateObj);
					}
					else
					{
						AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl aggregatesImpl2 = default(AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl);
						if (!section.PageAggregatesOverReportItems.TryGetValue(specialModeIndex, out aggregatesImpl2))
						{
							aggregatesImpl2 = new AspNetCore.ReportingServices.ReportProcessing.OnDemandReportObjectModel.AggregatesImpl(this.m_processingContext);
							section.PageAggregatesOverReportItems.Add(specialModeIndex, aggregatesImpl2);
						}
						aggregatesImpl2.Add(dataAggregateObj);
						this.m_reportItemToReportSection[specialModeIndex] = section;
					}
					dataAggregateObj.Init();
				}
			}
			reportObjectModel.ReportItemsImpl.SpecialMode = false;
			AspNetCore.ReportingServices.ReportIntermediateFormat.PageSection rifObject = null;
			IReportScopeInstance romInstance = null;
			if (sectionDef.Page.PageHeader != null)
			{
				rifObject = sectionDef.Page.PageHeader;
				romInstance = section.Page.PageHeader.Instance.ReportScopeInstance;
				section.Page.PageHeader.SetNewContext();
			}
			if (sectionDef.Page.PageFooter != null)
			{
				rifObject = sectionDef.Page.PageFooter;
				romInstance = section.Page.PageFooter.Instance.ReportScopeInstance;
				section.Page.PageFooter.SetNewContext();
			}
			if (sectionDef != null)
			{
				this.m_processingContext.SetupContext(rifObject, romInstance);
			}
		}
コード例 #15
0
 public override DataAggregate ConstructAggregator(OnDemandProcessingContext odpContext, DataAggregateInfo aggregateDef)
 {
     return(new First());
 }
コード例 #16
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)));
        }
コード例 #17
0
 private void CreateAggregates(List <AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo> aggDefs)
 {
     if (aggDefs != null && 0 < aggDefs.Count)
     {
         AggregatesImpl aggregatesImpl = this.m_odpContext.ReportObjectModel.AggregatesImpl;
         for (int i = 0; i < aggDefs.Count; i++)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo dataAggregateInfo = aggDefs[i];
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj  dataAggregateObj  = aggregatesImpl.GetAggregateObj(dataAggregateInfo.Name);
             if (dataAggregateObj == null)
             {
                 dataAggregateObj = new AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj(dataAggregateInfo, this.m_odpContext);
                 aggregatesImpl.Add(dataAggregateObj);
             }
             if (AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Previous != dataAggregateInfo.AggregateType)
             {
                 if (AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Aggregate == dataAggregateInfo.AggregateType)
                 {
                     RuntimeDataRegionObj.AddAggregate(ref this.m_customAggregates, dataAggregateObj);
                 }
                 else
                 {
                     RuntimeDataRegionObj.AddAggregate(ref this.m_nonCustomAggregates, dataAggregateObj);
                 }
             }
         }
     }
 }
コード例 #18
0
 public abstract DataAggregate ConstructAggregator(OnDemandProcessingContext odpContext, DataAggregateInfo aggregateDef);
コード例 #19
0
ファイル: Min.cs プロジェクト: enoksaju/reportingServicesRDLC
 public override DataAggregate ConstructAggregator(OnDemandProcessingContext odpContext, DataAggregateInfo aggregateDef)
 {
     return(new Min(odpContext.ProcessingComparer));
 }
コード例 #20
0
 public object GetNoRowsResult(DataAggregateInfo aggregateDef)
 {
     return(this.GetPrototype(aggregateDef).Result());
 }
コード例 #21
0
 public void ResetAll <T>(IEnumerable <T> aggregateDefs) where T : AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo
 {
     if (aggregateDefs != null)
     {
         foreach (T aggregateDef2 in aggregateDefs)
         {
             AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo aggregateDef = (AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateInfo)(object) aggregateDef2;
             this.Reset(aggregateDef);
         }
     }
 }