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); }
public VariantResult GetResult() { if (!this.m_isValueReady) { if (this.m_isVisited) { base.m_iErrorContext.Register(ProcessingErrorCode.rsCyclicExpression, Severity.Warning, this.m_textBox.ObjectType, this.m_textBox.Name, "Value"); throw new ReportProcessingException_InvalidOperationException(); } this.m_isVisited = true; ObjectType objectType = base.m_reportRT.ObjectType; string objectName = base.m_reportRT.ObjectName; string propertyName = base.m_reportRT.PropertyName; ReportProcessing.IScope currentScope = base.m_reportRT.CurrentScope; base.m_reportRT.CurrentScope = base.m_scope; this.m_result = base.m_reportRT.EvaluateTextBoxValueExpression(this.m_textBox); base.m_reportRT.CurrentScope = currentScope; base.m_reportRT.ObjectType = objectType; base.m_reportRT.ObjectName = objectName; base.m_reportRT.PropertyName = propertyName; this.m_isVisited = false; this.m_isValueReady = true; } return(this.m_result); }
internal UserSortFilterContext(UserSortFilterContext copy) { m_runtimeSortFilterInfo = copy.RuntimeSortFilterInfo; m_currentContainingScope = copy.CurrentContainingScope; m_containingScopes = copy.ContainingScopes; m_dataSetID = copy.DataSetID; m_detailScopeSubReports = copy.DetailScopeSubReports; m_inProcessUserSortPhase = copy.m_inProcessUserSortPhase; }
public void RegisterSortFilterExpressionScope(ReportProcessing.IScope container, ReportProcessing.RuntimeDataRegionObj scopeObj, bool[] isSortFilterExpressionScope) { RuntimeSortFilterEventInfoList runtimeSortFilterInfo = this.m_runtimeSortFilterInfo; if (runtimeSortFilterInfo != null && isSortFilterExpressionScope != null && scopeObj != null) { VariantList[] array = null; for (int i = 0; i < runtimeSortFilterInfo.Count; i++) { if (isSortFilterExpressionScope[i] && scopeObj.IsTargetForSort(i, false) && scopeObj.TargetScopeMatched(i, false)) { if (array == null && runtimeSortFilterInfo[i].EventSource.UserSort.GroupsInSortTarget != null) { int num = 0; array = new VariantList[runtimeSortFilterInfo[i].EventSource.UserSort.GroupsInSortTarget.Count]; scopeObj.GetScopeValues(runtimeSortFilterInfo[i].EventTarget, array, ref num); } runtimeSortFilterInfo[i].RegisterSortFilterExpressionScope(ref container.SortFilterExpressionScopeInfoIndices[i], scopeObj, array, i); } } } }
internal void RegisterSortFilterExpressionScope(ReportProcessing.IScope container, ReportProcessing.RuntimeDataRegionObj scopeObj, bool[] isSortFilterExpressionScope) { RuntimeSortFilterEventInfoList runtimeSortFilterInfo = m_runtimeSortFilterInfo; if (runtimeSortFilterInfo == null || isSortFilterExpressionScope == null || scopeObj == null) { return; } VariantList[] array = null; for (int i = 0; i < runtimeSortFilterInfo.Count; i++) { if (isSortFilterExpressionScope[i] && scopeObj.IsTargetForSort(i, detailSort: false) && scopeObj.TargetScopeMatched(i, detailSort: false)) { if (array == null && runtimeSortFilterInfo[i].EventSource.UserSort.GroupsInSortTarget != null) { int index = 0; array = new VariantList[runtimeSortFilterInfo[i].EventSource.UserSort.GroupsInSortTarget.Count]; scopeObj.GetScopeValues(runtimeSortFilterInfo[i].EventTarget, array, ref index); } runtimeSortFilterInfo[i].RegisterSortFilterExpressionScope(ref container.SortFilterExpressionScopeInfoIndices[i], scopeObj, array, i); } } }
internal void MatchEventSource(TextBox textBox, TextBoxInstance textBoxInstance, ReportProcessing.IScope containingScope, ReportProcessing.ProcessingContext processingContext) { bool flag = false; if (!(containingScope is ReportProcessing.RuntimePivotCell)) { while (containingScope != null && !(containingScope is ReportProcessing.RuntimeGroupLeafObj) && !(containingScope is ReportProcessing.RuntimeDetailObj) && !(containingScope is ReportProcessing.RuntimeOnePassDetailObj)) { containingScope = containingScope.GetOuterScope(includeSubReportContainingScope: true); } } if (containingScope == null) { if (m_eventSource.ContainingScopes == null || m_eventSource.ContainingScopes.Count == 0) { flag = true; } } else if (m_eventSourceScope == containingScope) { flag = true; DataRegion dataRegion = null; if (containingScope is ReportProcessing.RuntimeDetailObj) { dataRegion = ((ReportProcessing.RuntimeDetailObj)containingScope).DataRegionDef; } else if (containingScope is ReportProcessing.RuntimeOnePassDetailObj) { dataRegion = ((ReportProcessing.RuntimeOnePassDetailObj)containingScope).DataRegionDef; } if (dataRegion != null && dataRegion.CurrentDetailRowIndex != m_eventSourceDetailIndex) { flag = false; } } if (flag) { if (textBox == m_eventSource) { m_newUniqueName = textBoxInstance.UniqueName; m_page = processingContext.Pagination.GetTextBoxStartPage(textBox); } else if (m_peerSortFilters != null && m_peerSortFilters.Contains(textBox.ID)) { m_peerSortFilters[textBox.ID] = textBoxInstance.UniqueName; } } }