internal void ProcessUserSortForTarget(ObjectModelImpl reportObjectModel, ReportRuntime reportRuntime, ReportProcessing.IHierarchyObj target, ref ReportProcessing.DataRowList dataRows, bool targetForNonDetailSort) { if (targetForNonDetailSort && dataRows != null && 0 < dataRows.Count) { RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = null; IntList sortFilterInfoIndices = target.SortFilterInfoIndices; Global.Tracer.Assert(target.SortTree != null, "(null != target.SortTree)"); if (sortFilterInfoIndices != null) { runtimeSortFilterEventInfo = m_runtimeSortFilterInfo[sortFilterInfoIndices[0]]; } for (int i = 0; i < dataRows.Count; i++) { reportObjectModel.FieldsImpl.SetFields(dataRows[i]); object keyValue = DBNull.Value; if (runtimeSortFilterEventInfo != null) { keyValue = runtimeSortFilterEventInfo.GetSortOrder(reportRuntime); } target.SortTree.NextRow(keyValue); } dataRows = null; } target.MarkSortInfoProcessed(m_runtimeSortFilterInfo); }
internal bool IsSortFilterTarget(bool[] isSortFilterTarget, ReportProcessing.IScope outerScope, ReportProcessing.IHierarchyObj target, ref RuntimeUserSortTargetInfo userSortTargetInfo) { bool result = false; if (m_runtimeSortFilterInfo != null && isSortFilterTarget != null && (outerScope == null || !outerScope.TargetForNonDetailSort)) { for (int i = 0; i < m_runtimeSortFilterInfo.Count; i++) { RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = m_runtimeSortFilterInfo[i]; if (runtimeSortFilterEventInfo.EventTarget == null && isSortFilterTarget[i] && (outerScope == null || outerScope.TargetScopeMatched(i, detailSort: false))) { runtimeSortFilterEventInfo.EventTarget = target; if (userSortTargetInfo == null) { userSortTargetInfo = new RuntimeUserSortTargetInfo(target, i, runtimeSortFilterEventInfo); } else { userSortTargetInfo.AddSortInfo(target, i, runtimeSortFilterEventInfo); } result = true; } } } return(result); }
internal void AddSortInfoIndex(int sortInfoIndex, RuntimeSortFilterEventInfo sortInfo) { Global.Tracer.Assert(sortInfo.EventSource.UserSort.SortExpressionScope == null || !sortInfo.TargetSortFilterInfoAdded); if (m_sortFilterInfoIndices == null) { m_sortFilterInfoIndices = new IntList(); } m_sortFilterInfoIndices.Add(sortInfoIndex); sortInfo.TargetSortFilterInfoAdded = true; }
void ReportProcessing.IHierarchyObj.AddSortInfoIndex(int sortFilterInfoIndex, RuntimeSortFilterEventInfo sortInfo) { Global.Tracer.Assert(condition: false); }
internal SortFilterExpressionScopeObj(RuntimeSortFilterEventInfo owner) { m_owner = owner; m_scopeInstances = new ReportProcessing.RuntimeDataRegionObjList(); m_scopeValuesList = new ArrayList(); }
internal void AddSortInfo(ReportProcessing.IHierarchyObj owner, int sortInfoIndex, RuntimeSortFilterEventInfo sortInfo) { if (sortInfo.EventSource.UserSort.SortExpressionScope != null || owner.IsDetail) { if (sortInfo.EventSource.UserSort.SortExpressionScope == null) { AddSortInfoIndex(sortInfoIndex, sortInfo); } if (m_sortTree == null) { m_sortTree = new ReportProcessing.BTreeNode(owner); } } if (sortInfo.EventSource.UserSort.SortExpressionScope != null) { if (m_targetForNonDetailSort == null) { m_targetForNonDetailSort = new Hashtable(); } m_targetForNonDetailSort.Add(sortInfoIndex, null); } else { if (m_targetForDetailSort == null) { m_targetForDetailSort = new Hashtable(); } m_targetForDetailSort.Add(sortInfoIndex, null); } }
internal RuntimeUserSortTargetInfo(ReportProcessing.IHierarchyObj owner, int sortInfoIndex, RuntimeSortFilterEventInfo sortInfo) { AddSortInfo(owner, sortInfoIndex, sortInfo); }