public void AddSortInfo(IReference <IHierarchyObj> owner, int sortInfoIndex, IReference <RuntimeSortFilterEventInfo> sortInfo) { IInScopeEventSource eventSource = sortInfo.Value().EventSource; if (eventSource.UserSort.SortExpressionScope != null || owner.Value().IsDetail) { if (eventSource.UserSort.SortExpressionScope == null) { this.AddSortInfoIndex(sortInfoIndex, sortInfo); } if (this.m_sortTree == null) { IHierarchyObj hierarchyObj = owner.Value(); this.m_sortTree = new BTree(hierarchyObj, hierarchyObj.OdpContext, hierarchyObj.Depth + 1); } } if (eventSource.UserSort.SortExpressionScope != null) { if (this.m_targetForNonDetailSort == null) { this.m_targetForNonDetailSort = new Hashtable(); } this.m_targetForNonDetailSort.Add(sortInfoIndex, null); } else { if (this.m_targetForDetailSort == null) { this.m_targetForDetailSort = new Hashtable(); } this.m_targetForDetailSort.Add(sortInfoIndex, null); } }
private void CreateInstances() { this.m_odpContext.ReportRuntime.CurrentScope = this.m_dataSetObj; if (this.m_hasSortFilterInfo && this.m_odpContext.RuntimeSortFilterInfo != null) { if (this.m_odpContext.TopLevelContext.ReportRuntimeUserSortFilterInfo == null) { this.m_odpContext.TopLevelContext.ReportRuntimeUserSortFilterInfo = new List <IReference <RuntimeSortFilterEventInfo> >(); } this.m_odpContext.TopLevelContext.ReportRuntimeUserSortFilterInfo.AddRange(this.m_odpContext.RuntimeSortFilterInfo); } this.m_dataSetObj.CreateInstances(); if (this.m_odpContext.ReportDefinition.InScopeEventSources != null) { int count = this.m_odpContext.ReportDefinition.InScopeEventSources.Count; List <IInScopeEventSource> list = null; for (int i = 0; i < count; i++) { IInScopeEventSource inScopeEventSource = this.m_odpContext.ReportDefinition.InScopeEventSources[i]; if (inScopeEventSource.UserSort.DataSet == this.m_dataSet) { if (list == null) { list = new List <IInScopeEventSource>(count - i); } list.Add(inScopeEventSource); } } if (list != null) { UserSortFilterContext.ProcessEventSources(this.m_odpContext, this.m_dataSetObj, list); } } this.m_odpContext.ReportRuntime.CurrentScope = null; }
void IRIFReportScope.AddInScopeEventSource(IInScopeEventSource eventSource) { if (this.m_inScopeEventSources == null) { this.m_inScopeEventSources = new List <IInScopeEventSource>(); } this.m_inScopeEventSources.Add(eventSource); }
internal void ResetContextForTopLevelDataSet() { m_dataSetGlobalID = -1; m_currentSortFilterEventSource = null; m_runtimeSortFilterInfo = null; m_currentContainingScope = null; m_containingScopes = null; m_inProcessUserSortPhase = null; }
internal void UpdateSubReportScopes(Microsoft.ReportingServices.OnDemandProcessing.TablixProcessing.UserSortFilterContext context) { if (m_containingScopes != null && 0 < m_containingScopes.Count && m_containingScopes.LastEntry == null) { if (context.DetailScopeSubReports != null) { m_detailScopeSubReports = context.CloneDetailScopeSubReports(); } else { m_detailScopeSubReports = new List <SubReport>(); } m_detailScopeSubReports.Add(this); } else { m_detailScopeSubReports = context.DetailScopeSubReports; } if (context.ContainingScopes != null) { if (m_containingScopes != null && 0 < m_containingScopes.Count) { m_containingScopes.InsertRange(0, context.ContainingScopes); } else { m_containingScopes = context.ContainingScopes; } } if (m_report == null || m_report.EventSources == null) { return; } int count = m_report.EventSources.Count; for (int i = 0; i < count; i++) { IInScopeEventSource inScopeEventSource = m_report.EventSources[i]; if (inScopeEventSource.UserSort != null) { inScopeEventSource.UserSort.DetailScopeSubReports = m_detailScopeSubReports; } if (m_containingScopes != null && 0 < m_containingScopes.Count) { if (inScopeEventSource.ContainingScopes != null && 0 < inScopeEventSource.ContainingScopes.Count) { inScopeEventSource.ContainingScopes.InsertRange(0, m_containingScopes); continue; } inScopeEventSource.IsSubReportTopLevelScope = true; inScopeEventSource.ContainingScopes = m_containingScopes; } } }
public void UpdateSubReportScopes(AspNetCore.ReportingServices.OnDemandProcessing.TablixProcessing.UserSortFilterContext context) { if (this.m_containingScopes != null && 0 < this.m_containingScopes.Count && this.m_containingScopes.LastEntry == null) { if (context.DetailScopeSubReports != null) { this.m_detailScopeSubReports = context.CloneDetailScopeSubReports(); } else { this.m_detailScopeSubReports = new List <SubReport>(); } this.m_detailScopeSubReports.Add(this); } else { this.m_detailScopeSubReports = context.DetailScopeSubReports; } if (context.ContainingScopes != null) { if (this.m_containingScopes != null && 0 < this.m_containingScopes.Count) { this.m_containingScopes.InsertRange(0, context.ContainingScopes); } else { this.m_containingScopes = context.ContainingScopes; } } if (this.m_report != null && this.m_report.EventSources != null) { int count = this.m_report.EventSources.Count; for (int i = 0; i < count; i++) { IInScopeEventSource inScopeEventSource = this.m_report.EventSources[i]; if (inScopeEventSource.UserSort != null) { inScopeEventSource.UserSort.DetailScopeSubReports = this.m_detailScopeSubReports; } if (this.m_containingScopes != null && 0 < this.m_containingScopes.Count) { if (inScopeEventSource.ContainingScopes != null && 0 < inScopeEventSource.ContainingScopes.Count) { inScopeEventSource.ContainingScopes.InsertRange(0, this.m_containingScopes); } else { inScopeEventSource.IsSubReportTopLevelScope = true; inScopeEventSource.ContainingScopes = this.m_containingScopes; } } } } }
public override void ResolveReferences(Dictionary <AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType, List <MemberReference> > memberReferencesCollection, Dictionary <int, IReferenceable> referenceableItems) { List <MemberReference> list = default(List <MemberReference>); if (memberReferencesCollection.TryGetValue(Cell.m_Declaration.ObjectType, out list)) { foreach (MemberReference item2 in list) { switch (item2.MemberName) { case MemberName.ParentRowID: Global.Tracer.Assert(referenceableItems.ContainsKey(item2.RefID), "ParentRowID"); base.m_parentIDOwner = (IDOwner)referenceableItems[item2.RefID]; this.m_parentRowID = item2.RefID; break; case MemberName.ParentColumnID: Global.Tracer.Assert(referenceableItems.ContainsKey(item2.RefID), "ParentColumnID"); this.m_parentColumnIDOwner = (IDOwner)referenceableItems[item2.RefID]; this.m_parentColumnID = item2.RefID; break; case MemberName.DataRegionDef: { IReferenceable referenceable2 = default(IReferenceable); referenceableItems.TryGetValue(item2.RefID, out referenceable2); Global.Tracer.Assert(referenceable2 != null && ((ReportItem)referenceable2).IsDataRegion, "DataRegionDef"); this.m_dataRegionDef = (DataRegion)referenceable2; break; } case MemberName.InScopeEventSources: { IReferenceable referenceable = default(IReferenceable); referenceableItems.TryGetValue(item2.RefID, out referenceable); IInScopeEventSource item = (IInScopeEventSource)referenceable; if (this.m_inScopeEventSources == null) { this.m_inScopeEventSources = new List <IInScopeEventSource>(); } this.m_inScopeEventSources.Add(item); break; } default: Global.Tracer.Assert(false); break; } } } }
public override void ResolveReferences(Dictionary <Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType, List <MemberReference> > memberReferencesCollection, Dictionary <int, IReferenceable> referenceableItems) { if (!memberReferencesCollection.TryGetValue(m_Declaration.ObjectType, out List <MemberReference> value)) { return; } foreach (MemberReference item2 in value) { switch (item2.MemberName) { case MemberName.ParentRowID: Global.Tracer.Assert(referenceableItems.ContainsKey(item2.RefID), "ParentRowID"); m_parentIDOwner = (IDOwner)referenceableItems[item2.RefID]; m_parentRowID = item2.RefID; break; case MemberName.ParentColumnID: Global.Tracer.Assert(referenceableItems.ContainsKey(item2.RefID), "ParentColumnID"); m_parentColumnIDOwner = (IDOwner)referenceableItems[item2.RefID]; m_parentColumnID = item2.RefID; break; case MemberName.DataRegionDef: { referenceableItems.TryGetValue(item2.RefID, out IReferenceable value3); Global.Tracer.Assert(value3 != null && ((ReportItem)value3).IsDataRegion, "DataRegionDef"); m_dataRegionDef = (DataRegion)value3; break; } case MemberName.InScopeEventSources: { referenceableItems.TryGetValue(item2.RefID, out IReferenceable value2); IInScopeEventSource item = (IInScopeEventSource)value2; if (m_inScopeEventSources == null) { m_inScopeEventSources = new List <IInScopeEventSource>(); } m_inScopeEventSources.Add(item); break; } default: Global.Tracer.Assert(condition: false); break; } } }
public void UpdateSubReportEventSourceGlobalDataSetIds(SubReportInfo subReportInfo) { this.m_odpSubReportInfo = subReportInfo; if (this.m_report != null && this.m_report.EventSources != null) { int count = this.m_report.EventSources.Count; for (int i = 0; i < count; i++) { IInScopeEventSource inScopeEventSource = this.m_report.EventSources[i]; if (inScopeEventSource.UserSort != null && -1 != subReportInfo.UserSortDataSetGlobalId) { inScopeEventSource.UserSort.SubReportDataSetGlobalId = subReportInfo.UserSortDataSetGlobalId; } } } }
internal void UpdateSubReportEventSourceGlobalDataSetIds(SubReportInfo subReportInfo) { m_odpSubReportInfo = subReportInfo; if (m_report == null || m_report.EventSources == null) { return; } int count = m_report.EventSources.Count; for (int i = 0; i < count; i++) { IInScopeEventSource inScopeEventSource = m_report.EventSources[i]; if (inScopeEventSource.UserSort != null && -1 != subReportInfo.UserSortDataSetGlobalId) { inScopeEventSource.UserSort.SubReportDataSetGlobalId = subReportInfo.UserSortDataSetGlobalId; } } }
public void Deserialize(IntermediateFormatReader reader) { reader.RegisterDeclaration(SortFilterEventInfo.m_Declaration); while (reader.NextMember()) { switch (reader.CurrentMember.MemberName) { case MemberName.EventSource: this.m_eventSource = reader.ReadGlobalReference <IInScopeEventSource>(); break; case MemberName.EventSourceScopeInfo: this.m_eventSourceScopeInfo = reader.ReadArrayOfListsOfPrimitives <object>(); break; default: Global.Tracer.Assert(false); break; } } }
public void AddInScopeEventSource(IInScopeEventSource eventSource) { Global.Tracer.Assert(false, "Top level event sources should be registered on the Report, not ReportSection"); }
internal bool PopulateRuntimeSortFilterEventInfo(OnDemandProcessingContext odpContext, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet myDataSet) { if (odpContext.TopLevelContext.UserSortFilterInfo == null || odpContext.TopLevelContext.UserSortFilterInfo.OdpSortInfo == null || odpContext.TopLevelContext.OldSortFilterEventInfo == null) { return(false); } if (-1 != m_dataSetGlobalID) { return(false); } m_runtimeSortFilterInfo = null; EventInformation.OdpSortEventInfo odpSortInfo = odpContext.TopLevelContext.UserSortFilterInfo.OdpSortInfo; for (int i = 0; i < odpSortInfo.Count; i++) { string uniqueNameAt = odpSortInfo.GetUniqueNameAt(i); Microsoft.ReportingServices.ReportIntermediateFormat.SortFilterEventInfo sortFilterEventInfo = odpContext.TopLevelContext.OldSortFilterEventInfo[uniqueNameAt]; if (sortFilterEventInfo == null || sortFilterEventInfo.EventSource.UserSort == null) { continue; } int num = sortFilterEventInfo.EventSource.UserSort.SubReportDataSetGlobalId; if (-1 == num) { num = sortFilterEventInfo.EventSource.UserSort.DataSet.GlobalID; } if (num == myDataSet.GlobalID) { if (m_runtimeSortFilterInfo == null) { m_runtimeSortFilterInfo = new List <IReference <RuntimeSortFilterEventInfo> >(); } RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = new RuntimeSortFilterEventInfo(sortFilterEventInfo.EventSource, uniqueNameAt, odpSortInfo.GetSortDirectionAt(i), sortFilterEventInfo.EventSourceScopeInfo, odpContext, (m_currentContainingScope == null) ? 1 : m_currentContainingScope.Value().Depth); runtimeSortFilterEventInfo.SelfReference.UnPinValue(); m_runtimeSortFilterInfo.Add(runtimeSortFilterEventInfo.SelfReference); } } if (m_runtimeSortFilterInfo != null) { int count = m_runtimeSortFilterInfo.Count; for (int j = 0; j < count; j++) { IReference <RuntimeSortFilterEventInfo> reference = m_runtimeSortFilterInfo[j]; using (reference.PinValue()) { RuntimeSortFilterEventInfo runtimeSortFilterEventInfo2 = reference.Value(); IInScopeEventSource eventSource = runtimeSortFilterEventInfo2.EventSource; Microsoft.ReportingServices.ReportIntermediateFormat.ISortFilterScope sortExpressionScope = eventSource.UserSort.SortExpressionScope; if (sortExpressionScope != null) { sortExpressionScope.IsSortFilterExpressionScope = SetSortFilterInfo(sortExpressionScope.IsSortFilterExpressionScope, count, j); } Microsoft.ReportingServices.ReportIntermediateFormat.ISortFilterScope sortTarget = eventSource.UserSort.SortTarget; if (sortTarget != null) { sortTarget.IsSortFilterTarget = SetSortFilterInfo(sortTarget.IsSortFilterTarget, count, j); } if (eventSource.ContainingScopes != null && 0 < eventSource.ContainingScopes.Count) { int num2 = 0; int num3 = 0; for (int k = 0; k < eventSource.ContainingScopes.Count; k++) { Microsoft.ReportingServices.ReportIntermediateFormat.Grouping grouping = eventSource.ContainingScopes[k]; if (grouping != null && grouping.IsDetail) { continue; } List <object> list = runtimeSortFilterEventInfo2.SortSourceScopeInfo[num2]; if (grouping != null) { if (grouping.SortFilterScopeInfo == null) { grouping.SortFilterScopeInfo = new List <object> [count]; for (int l = 0; l < count; l++) { grouping.SortFilterScopeInfo[l] = null; } grouping.SortFilterScopeIndex = new int[count]; for (int m = 0; m < count; m++) { grouping.SortFilterScopeIndex[m] = -1; } } grouping.SortFilterScopeInfo[j] = list; grouping.SortFilterScopeIndex[j] = num2; } else { List <Microsoft.ReportingServices.ReportIntermediateFormat.SubReport> detailScopeSubReports = eventSource.UserSort.DetailScopeSubReports; Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem = (detailScopeSubReports == null || num3 >= detailScopeSubReports.Count) ? eventSource.Parent : detailScopeSubReports[num3++].Parent; while (reportItem != null && !reportItem.IsDataRegion) { reportItem = reportItem.Parent; } Global.Tracer.Assert(reportItem.IsDataRegion, "(parent.IsDataRegion)"); Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem; if (dataRegion.SortFilterSourceDetailScopeInfo == null) { dataRegion.SortFilterSourceDetailScopeInfo = new int[count]; for (int n = 0; n < count; n++) { dataRegion.SortFilterSourceDetailScopeInfo[n] = -1; } } Global.Tracer.Assert(list != null && 1 == list.Count, "(null != scopeValues && 1 == scopeValues.Count)"); dataRegion.SortFilterSourceDetailScopeInfo[j] = (int)list[0]; } num2++; } } Microsoft.ReportingServices.ReportIntermediateFormat.GroupingList groupsInSortTarget = eventSource.UserSort.GroupsInSortTarget; if (groupsInSortTarget != null) { for (int num4 = 0; num4 < groupsInSortTarget.Count; num4++) { groupsInSortTarget[num4].NeedScopeInfoForSortFilterExpression = SetSortFilterInfo(groupsInSortTarget[num4].NeedScopeInfoForSortFilterExpression, count, j); } } List <int> peerSortFilters = eventSource.GetPeerSortFilters(create: false); if (peerSortFilters == null || peerSortFilters.Count == 0) { continue; } if (runtimeSortFilterEventInfo2.PeerSortFilters == null) { runtimeSortFilterEventInfo2.PeerSortFilters = new Hashtable(); } for (int num5 = 0; num5 < peerSortFilters.Count; num5++) { if (eventSource.ID != peerSortFilters[num5]) { runtimeSortFilterEventInfo2.PeerSortFilters.Add(peerSortFilters[num5], null); } } } } } return(true); }
public SortFilterEventInfo(IInScopeEventSource eventSource) { this.m_eventSource = eventSource; }
internal SortFilterEventInfo(IInScopeEventSource eventSource) { m_eventSource = eventSource; }