internal void SetupCellRunningValues(Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] cellRunningValueValues) { if (cellRunningValueValues == null) { return; } AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; int num = (m_staticCellPreviousValues != null) ? m_staticCellPreviousValues.Count : 0; int num2 = (m_staticCellRVs != null) ? m_staticCellRVs.Count : 0; if (num2 > 0) { for (int i = 0; i < num2; i++) { string text = m_staticCellRVs[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text); Global.Tracer.Assert(aggregateObj != null, "Missing expected running value: {0}", text); aggregateObj.Set(cellRunningValueValues[i]); } } if (num > 0) { for (int j = 0; j < num; j++) { string text2 = m_staticCellPreviousValues[j]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj2 = aggregatesImpl.GetAggregateObj(text2); Global.Tracer.Assert(aggregateObj2 != null, "Missing expected running value: {0}", text2); aggregateObj2.Set(cellRunningValueValues[num2 + j]); } } }
public override void Add(string textboxName, object textboxValue) { if (textboxName == null) { throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidOperation); } foreach (DataAggregateObj @object in this.m_aggregates.Objects) { this.m_processingContext.ReportObjectModel.AggregatesImpl.Add(@object); } if (this.m_processingContext.ReportItemsReferenced) { TextBoxImpl textBoxImpl = (TextBoxImpl)((ReportItems)this.m_processingContext.ReportObjectModel.ReportItemsImpl)[textboxName]; if (textBoxImpl != null) { textBoxImpl.SetResult(new VariantResult(false, textboxValue)); } AggregatesImpl aggregatesImpl = (AggregatesImpl)this.m_aggregatesOverReportItems[textboxName]; if (aggregatesImpl != null) { foreach (DataAggregateObj object2 in aggregatesImpl.Objects) { object2.Update(); } } } }
private void AddRunningValue(Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo runningValue, List <string> runningValuesInGroup, List <string> previousValuesInGroup, Dictionary <string, IReference <RuntimeGroupRootObj> > groupCollection) { AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; bool flag = runningValue.AggregateType == Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Previous; List <string> list = (!flag) ? runningValuesInGroup : previousValuesInGroup; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = aggregatesImpl.GetAggregateObj(runningValue.Name); if (dataAggregateObj == null) { dataAggregateObj = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj(runningValue, m_odpContext); aggregatesImpl.Add(dataAggregateObj); } else if (flag && (runningValue.Scope == null || runningValue.IsScopedInEvaluationScope)) { dataAggregateObj.Init(); } if (runningValue.Scope != null) { if (groupCollection.TryGetValue(runningValue.Scope, out IReference <RuntimeGroupRootObj> value)) { using (value.PinValue()) { value.Value().AddScopedRunningValue(dataAggregateObj); } } else { Global.Tracer.Assert(condition: false, "RV with runtime scope escalation"); } } if (!list.Contains(dataAggregateObj.Name)) { list.Add(dataAggregateObj.Name); } }
internal override void Add(string textboxName, object textboxValue) { if (textboxName == null) { throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidOperation); } foreach (DataAggregateObj @object in m_aggregates.Objects) { m_processingContext.ReportObjectModel.AggregatesImpl.Add(@object); } if (!m_processingContext.ReportItemsReferenced) { return; } ((TextBoxImpl)m_processingContext.ReportObjectModel.ReportItemsImpl[textboxName])?.SetResult(new VariantResult(errorOccurred: false, textboxValue)); AggregatesImpl aggregatesImpl = (AggregatesImpl)m_aggregatesOverReportItems[textboxName]; if (aggregatesImpl == null) { return; } foreach (DataAggregateObj object2 in aggregatesImpl.Objects) { object2.Update(); } }
internal void DoneReadingRows(ref Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] runningValueValues, ref Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] runningValueOfAggregateValues, ref Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[] cellRunningValueValues) { AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; RuntimeRICollection.StoreRunningValues(aggregatesImpl, m_hierarchyDef.RunningValues, ref runningValueValues); if (m_hierarchyDef.DataScopeInfo != null) { RuntimeRICollection.StoreRunningValues(aggregatesImpl, m_hierarchyDef.DataScopeInfo.RunningValuesOfAggregates, ref runningValueOfAggregateValues); } int num = (m_staticCellPreviousValues != null) ? m_staticCellPreviousValues.Count : 0; int num2 = (m_staticCellRVs != null) ? m_staticCellRVs.Count : 0; if (num2 > 0) { cellRunningValueValues = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[num2 + num]; for (int i = 0; i < num2; i++) { Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(m_staticCellRVs[i]); cellRunningValueValues[i] = aggregateObj.AggregateResult(); } } if (num > 0) { if (cellRunningValueValues == null) { cellRunningValueValues = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult[num]; } for (int j = 0; j < num; j++) { Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj2 = aggregatesImpl.GetAggregateObj(m_staticCellPreviousValues[j]); cellRunningValueValues[num2 + j] = aggregateObj2.AggregateResult(); } } }
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); } } } } }
private void CreateAggregates(List <Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo> aggDefs) { if (aggDefs == null || 0 >= aggDefs.Count) { return; } AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; for (int i = 0; i < aggDefs.Count; i++) { Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo dataAggregateInfo = aggDefs[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = aggregatesImpl.GetAggregateObj(dataAggregateInfo.Name); if (dataAggregateObj == null) { dataAggregateObj = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj(dataAggregateInfo, m_odpContext); aggregatesImpl.Add(dataAggregateObj); } if (Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Previous != dataAggregateInfo.AggregateType) { if (Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Aggregate == dataAggregateInfo.AggregateType) { RuntimeDataRegionObj.AddAggregate(ref m_customAggregates, dataAggregateObj); } else { RuntimeDataRegionObj.AddAggregate(ref m_nonCustomAggregates, dataAggregateObj); } } } }
private void PageInit() { this.m_processingContext.ReportObjectModel.GlobalsImpl.SetPageNumbers(base.m_currentPageNumber, base.m_totalPages); this.m_processingContext.ReportObjectModel.ReportItemsImpl = new ReportItemsImpl(); this.m_processingContext.ReportObjectModel.AggregatesImpl = new AggregatesImpl(this.m_processingContext.ReportRuntime); if (this.m_processingContext.ReportRuntime.ReportExprHost != null) { this.m_processingContext.RuntimeInitializeReportItemObjs(this.m_report.ReportItems, true, true); if (this.m_report.PageHeader != null) { if (this.m_processingContext.ReportRuntime.ReportExprHost != null) { this.m_report.PageHeader.SetExprHost(this.m_processingContext.ReportRuntime.ReportExprHost, this.m_processingContext.ReportObjectModel); } this.m_processingContext.RuntimeInitializeReportItemObjs(this.m_report.PageHeader.ReportItems, false, false); } if (this.m_report.PageFooter != null) { if (this.m_processingContext.ReportRuntime.ReportExprHost != null) { this.m_report.PageFooter.SetExprHost(this.m_processingContext.ReportRuntime.ReportExprHost, this.m_processingContext.ReportObjectModel); } this.m_processingContext.RuntimeInitializeReportItemObjs(this.m_report.PageFooter.ReportItems, false, false); } } this.m_aggregates = new AggregatesImpl(this.m_processingContext.ReportRuntime); this.m_aggregatesOverReportItems = new Hashtable(); this.m_processingContext.ReportObjectModel.ReportItemsImpl.SpecialMode = true; if (this.m_report.PageAggregates != null) { for (int i = 0; i < this.m_report.PageAggregates.Count; i++) { DataAggregateInfo dataAggregateInfo = this.m_report.PageAggregates[i]; dataAggregateInfo.ExprHostInitialized = false; DataAggregateObj dataAggregateObj = new DataAggregateObj(dataAggregateInfo, this.m_processingContext); object[] array = default(object[]); DataFieldStatus dataFieldStatus = default(DataFieldStatus); dataAggregateObj.EvaluateParameters(out array, out dataFieldStatus); string specialModeIndex = this.m_processingContext.ReportObjectModel.ReportItemsImpl.GetSpecialModeIndex(); if (specialModeIndex == null) { this.m_aggregates.Add(dataAggregateObj); } else { AggregatesImpl aggregatesImpl = (AggregatesImpl)this.m_aggregatesOverReportItems[specialModeIndex]; if (aggregatesImpl == null) { aggregatesImpl = new AggregatesImpl(this.m_processingContext.ReportRuntime); this.m_aggregatesOverReportItems.Add(specialModeIndex, aggregatesImpl); } aggregatesImpl.Add(dataAggregateObj); } dataAggregateObj.Init(); } } this.m_processingContext.ReportObjectModel.ReportItemsImpl.SpecialMode = false; }
private void PageInit() { m_processingContext.ReportObjectModel.GlobalsImpl.SetPageNumbers(m_currentPageNumber, m_totalPages); m_processingContext.ReportObjectModel.ReportItemsImpl = new ReportItemsImpl(); m_processingContext.ReportObjectModel.AggregatesImpl = new AggregatesImpl(m_processingContext.ReportRuntime); if (m_processingContext.ReportRuntime.ReportExprHost != null) { m_processingContext.RuntimeInitializeReportItemObjs(m_report.ReportItems, traverseDataRegions: true, setValue: true); if (m_report.PageHeader != null) { if (m_processingContext.ReportRuntime.ReportExprHost != null) { m_report.PageHeader.SetExprHost(m_processingContext.ReportRuntime.ReportExprHost, m_processingContext.ReportObjectModel); } m_processingContext.RuntimeInitializeReportItemObjs(m_report.PageHeader.ReportItems, traverseDataRegions: false, setValue: false); } if (m_report.PageFooter != null) { if (m_processingContext.ReportRuntime.ReportExprHost != null) { m_report.PageFooter.SetExprHost(m_processingContext.ReportRuntime.ReportExprHost, m_processingContext.ReportObjectModel); } m_processingContext.RuntimeInitializeReportItemObjs(m_report.PageFooter.ReportItems, traverseDataRegions: false, setValue: false); } } m_aggregates = new AggregatesImpl(m_processingContext.ReportRuntime); m_aggregatesOverReportItems = new Hashtable(); m_processingContext.ReportObjectModel.ReportItemsImpl.SpecialMode = true; if (m_report.PageAggregates != null) { for (int i = 0; i < m_report.PageAggregates.Count; i++) { DataAggregateInfo dataAggregateInfo = m_report.PageAggregates[i]; dataAggregateInfo.ExprHostInitialized = false; DataAggregateObj dataAggregateObj = new DataAggregateObj(dataAggregateInfo, m_processingContext); dataAggregateObj.EvaluateParameters(out object[] _, out DataFieldStatus _); string specialModeIndex = m_processingContext.ReportObjectModel.ReportItemsImpl.GetSpecialModeIndex(); if (specialModeIndex == null) { m_aggregates.Add(dataAggregateObj); } else { AggregatesImpl aggregatesImpl = (AggregatesImpl)m_aggregatesOverReportItems[specialModeIndex]; if (aggregatesImpl == null) { aggregatesImpl = new AggregatesImpl(m_processingContext.ReportRuntime); m_aggregatesOverReportItems.Add(specialModeIndex, aggregatesImpl); } aggregatesImpl.Add(dataAggregateObj); } dataAggregateObj.Init(); } } m_processingContext.ReportObjectModel.ReportItemsImpl.SpecialMode = false; }
internal static void UpdateRunningValues(OnDemandProcessingContext odpContext, List <string> runningValueNames) { AggregatesImpl aggregatesImpl = odpContext.ReportObjectModel.AggregatesImpl; for (int i = 0; i < runningValueNames.Count; i++) { string name = runningValueNames[i]; aggregatesImpl.GetAggregateObj(name).Update(); } }
public void ResetAggregates(AggregatesImpl reportOmAggregates) { this.ResetAggregates(reportOmAggregates, this.m_dataRegionDef.CellAggregates, this.m_aggregateIndexes); this.ResetAggregates(reportOmAggregates, this.m_dataRegionDef.CellPostSortAggregates, this.m_postSortAggregateIndexes); this.ResetAggregates(reportOmAggregates, this.m_dataRegionDef.CellRunningValues, this.m_runningValueIndexes); if (this.m_dataScopeInfo != null) { this.m_dataScopeInfo.ResetAggregates(reportOmAggregates); } }
private void ResetAggregates <T>(AggregatesImpl reportOmAggregates, List <T> aggregateDefs, List <int> aggregateIndices) where T : DataAggregateInfo { if (aggregateDefs != null && aggregateIndices != null) { for (int i = 0; i < aggregateIndices.Count; i++) { int index = aggregateIndices[i]; reportOmAggregates.Reset((DataAggregateInfo)(object)aggregateDefs[index]); } } }
public static void UpdateRunningValues(OnDemandProcessingContext odpContext, List <string> runningValueNames) { AggregatesImpl aggregatesImpl = odpContext.ReportObjectModel.AggregatesImpl; for (int i = 0; i < runningValueNames.Count; i++) { string name = runningValueNames[i]; AspNetCore.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(name); aggregateObj.Update(); } }
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; } }
internal static void AddRunningValues(OnDemandProcessingContext odpContext, List <Microsoft.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) { return; } 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++) { Microsoft.ReportingServices.ReportIntermediateFormat.RunningValueInfo runningValueInfo = runningValues[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = aggregatesImpl.GetAggregateObj(runningValueInfo.Name); if (dataAggregateObj == null) { dataAggregateObj = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj(runningValueInfo, odpContext); aggregatesImpl.Add(dataAggregateObj); } if (runningValueInfo.Scope != null) { if (groupCollection.TryGetValue(runningValueInfo.Scope, out IReference <RuntimeGroupRootObj> value)) { using (value.PinValue()) { value.Value().AddScopedRunningValue(dataAggregateObj); } } else { Global.Tracer.Assert(condition: false); } } if (runningValueInfo.AggregateType == Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo.AggregateTypes.Previous) { previousValuesInGroup.Add(dataAggregateObj.Name); } else { runningValuesInGroup.Add(dataAggregateObj.Name); } } }
private void CalculateDRPreviousAggregates() { SetupEnvironment(); if (m_previousValues != null) { AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; for (int i = 0; i < m_previousValues.Count; i++) { string text = m_previousValues[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text); Global.Tracer.Assert(aggregateObj != null, "Missing expected previous aggregate: {0}", text); aggregateObj.Update(); } } }
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); } } } }
internal override void CalculatePreviousAggregates() { if (!FlagUtils.HasFlag(m_dataAction, DataActions.PostSortAggregates)) { return; } AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; if (m_hierarchyDef.DataRegionDef.ProcessCellRunningValues) { if (m_cellPreviousValues != null) { for (int i = 0; i < m_cellPreviousValues.Count; i++) { string text = m_cellPreviousValues[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text); Global.Tracer.Assert(aggregateObj != null, "Missing expected previous aggregate: {0}", text); aggregateObj.Update(); } } if (m_outerScope != null && (m_outerDataAction & DataActions.PostSortAggregates) != 0) { using (m_outerScope.PinValue()) { m_outerScope.Value().CalculatePreviousAggregates(); } } return; } if (m_staticCellPreviousValues != null) { for (int j = 0; j < m_staticCellPreviousValues.Count; j++) { string text2 = m_staticCellPreviousValues[j]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj2 = aggregatesImpl.GetAggregateObj(text2); Global.Tracer.Assert(aggregateObj2 != null, "Missing expected previous aggregate: {0}", text2); aggregateObj2.Update(); } } base.CalculatePreviousAggregates(); }
public override void ReadRow(DataActions dataAction, ITraversalContext context) { if (!FlagUtils.HasFlag(dataAction, DataActions.PostSortAggregates) || !FlagUtils.HasFlag(m_dataAction, DataActions.PostSortAggregates)) { return; } AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; if (m_hierarchyDef.DataRegionDef.ProcessCellRunningValues) { if (m_cellRVs != null) { for (int i = 0; i < m_cellRVs.Count; i++) { string text = m_cellRVs[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text); Global.Tracer.Assert(aggregateObj != null, "Missing expected running value: {0}", text); aggregateObj.Update(); } } if (m_outerScope != null && m_hierarchyDef.DataRegionDef.CellPostSortAggregates != null) { using (m_outerScope.PinValue()) { m_outerScope.Value().ReadRow(dataAction, context); } } return; } if (m_staticCellRVs != null) { for (int j = 0; j < m_staticCellRVs.Count; j++) { string text2 = m_staticCellRVs[j]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj2 = aggregatesImpl.GetAggregateObj(text2); Global.Tracer.Assert(aggregateObj2 != null, "Missing expected running value: {0}", text2); aggregateObj2.Update(); } } base.ReadRow(dataAction, context); }
internal override void CalculatePreviousAggregates() { if (m_previousValuesInGroup != null) { AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; for (int i = 0; i < m_previousValuesInGroup.Count; i++) { string text = m_previousValuesInGroup[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text); Global.Tracer.Assert(aggregateObj != null, "Missing expected previous aggregate: {0}", text); aggregateObj.Update(); } } if (m_outerScope != null && (m_outerDataAction & DataActions.PostSortAggregates) != 0) { using (m_outerScope.PinValue()) { m_outerScope.Value().CalculatePreviousAggregates(); } } }
public override void ReadRow(DataActions dataAction, ITraversalContext context) { if (DataActions.PostSortAggregates == dataAction && m_runningValuesInGroup != null) { AggregatesImpl aggregatesImpl = m_odpContext.ReportObjectModel.AggregatesImpl; for (int i = 0; i < m_runningValuesInGroup.Count; i++) { string text = m_runningValuesInGroup[i]; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj aggregateObj = aggregatesImpl.GetAggregateObj(text); Global.Tracer.Assert(aggregateObj != null, "Missing expected running value aggregate: {0}", text); aggregateObj.Update(); } } if (m_outerScope != null && (dataAction & m_outerDataAction) != 0) { using (m_outerScope.PinValue()) { m_outerScope.Value().ReadRow(dataAction, context); } } }
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; } }
internal override void UpdatePageSections(ReportSection section) { Microsoft.ReportingServices.ReportRendering.PageSection header = null; Microsoft.ReportingServices.ReportRendering.PageSection footer = null; foreach (AggregatesImpl value in m_aggregatesOverReportItems.Values) { foreach (DataAggregateObj @object in value.Objects) { m_processingContext.ReportObjectModel.AggregatesImpl.Add(@object); } } if (m_report.PageHeaderEvaluation) { header = GenerateRenderPageSection(m_report.PageHeader, "ph"); } if (m_report.PageFooterEvaluation) { footer = GenerateRenderPageSection(m_report.PageFooter, "pf"); } m_aggregates = null; m_aggregatesOverReportItems = null; section.Page.UpdateWithCurrentPageSections(header, footer); }
public override void UpdatePageSections(ReportSection section) { AspNetCore.ReportingServices.ReportRendering.PageSection header = null; AspNetCore.ReportingServices.ReportRendering.PageSection footer = null; foreach (AggregatesImpl value in this.m_aggregatesOverReportItems.Values) { foreach (DataAggregateObj @object in value.Objects) { this.m_processingContext.ReportObjectModel.AggregatesImpl.Add(@object); } } if (this.m_report.PageHeaderEvaluation) { header = this.GenerateRenderPageSection(this.m_report.PageHeader, "ph"); } if (this.m_report.PageFooterEvaluation) { footer = this.GenerateRenderPageSection(this.m_report.PageFooter, "pf"); } this.m_aggregates = null; this.m_aggregatesOverReportItems = null; section.Page.UpdateWithCurrentPageSections(header, footer); }
private void PageInit(ReportSection section) { ObjectModelImpl reportObjectModel = m_processingContext.ReportObjectModel; 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(Microsoft.ReportingServices.RdlExpressions.VariantResult)); section.PageSectionItemsForHeadFoot.ResetAll(); reportObjectModel.GlobalsImpl.SetPageNumbers(m_currentPageNumber, m_totalPages, m_currentOverallPageNumber, m_overallTotalPages); reportObjectModel.GlobalsImpl.SetPageName(m_pageName); _ = m_romReport.ReportDef; Microsoft.ReportingServices.ReportIntermediateFormat.ReportSection sectionDef = section.SectionDef; Microsoft.ReportingServices.ReportIntermediateFormat.Page page = sectionDef.Page; section.PageAggregatesOverReportItems = new Dictionary <string, AggregatesImpl>(); m_processingContext.ReportObjectModel.ReportItemsImpl.SpecialMode = true; if (page.PageAggregates != null) { for (int i = 0; i < page.PageAggregates.Count; i++) { Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateInfo dataAggregateInfo = page.PageAggregates[i]; aggregatesImpl.Remove(dataAggregateInfo); dataAggregateInfo.ExprHostInitialized = false; Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj dataAggregateObj = new Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj(dataAggregateInfo, m_processingContext); dataAggregateObj.EvaluateParameters(out object[] _, out DataFieldStatus _); string specialModeIndex = reportObjectModel.ReportItemsImpl.GetSpecialModeIndex(); if (specialModeIndex == null) { aggregatesImpl.Add(dataAggregateObj); } else { if (!section.PageAggregatesOverReportItems.TryGetValue(specialModeIndex, out AggregatesImpl value)) { value = new AggregatesImpl(m_processingContext); section.PageAggregatesOverReportItems.Add(specialModeIndex, value); } value.Add(dataAggregateObj); m_reportItemToReportSection[specialModeIndex] = section; } dataAggregateObj.Init(); } } reportObjectModel.ReportItemsImpl.SpecialMode = false; Microsoft.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) { m_processingContext.SetupContext(rifObject, romInstance); } }
internal void ResetAggregates(AggregatesImpl reportOmAggregates) { reportOmAggregates.ResetAll(m_aggregatesOfAggregates); reportOmAggregates.ResetAll(m_postSortAggregatesOfAggregates); reportOmAggregates.ResetAll(m_runningValuesOfAggregates); }
public void ResetAggregates(AggregatesImpl reportOmAggregates) { reportOmAggregates.ResetAll(this.m_aggregatesOfAggregates); reportOmAggregates.ResetAll(this.m_postSortAggregatesOfAggregates); reportOmAggregates.ResetAll(this.m_runningValuesOfAggregates); }
public void ResetAggregates(AggregatesImpl reportOmAggregates) { reportOmAggregates.ResetAll(m_aggregates); reportOmAggregates.ResetAll(m_postSortAggregates); }