コード例 #1
0
 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;
 }
コード例 #2
0
 internal void CopyTo(IntList target)
 {
     if (target != null)
     {
         target.Clear();
         for (int i = 0; i < Count; i++)
         {
             target.Add(this[i]);
         }
     }
 }
コード例 #3
0
        private void RegisterOverlappingItems(InitializationContext context, int count, SortedReportItemIndexList sortedTop, bool isSortedVertically)
        {
            Hashtable hashtable = new Hashtable(count);

            for (int i = 0; i < count - 1; i++)
            {
                int    num  = sortedTop[i];
                double num2 = isSortedVertically ? m_entries[num].AbsoluteBottomValue : m_entries[num].AbsoluteRightValue;
                bool   flag = true;
                for (int j = i + 1; j < count && flag; j++)
                {
                    int num3 = sortedTop[j];
                    Global.Tracer.Assert(num != num3, "(currentIndex != peerIndex)");
                    double num4 = isSortedVertically ? m_entries[num3].AbsoluteTopValue : m_entries[num3].AbsoluteLeftValue;
                    if (num2 > num4)
                    {
                        int     num5    = Math.Min(num, num3);
                        int     num6    = Math.Max(num, num3);
                        IntList intList = hashtable[num5] as IntList;
                        if (intList == null)
                        {
                            intList         = new IntList();
                            hashtable[num5] = intList;
                        }
                        intList.Add(num6);
                    }
                    else
                    {
                        flag = false;
                    }
                }
            }
            foreach (int key in hashtable.Keys)
            {
                IntList intList2 = hashtable[key] as IntList;
                double  num8     = isSortedVertically ? m_entries[key].AbsoluteLeftValue : m_entries[key].AbsoluteTopValue;
                double  num9     = isSortedVertically ? m_entries[key].AbsoluteRightValue : m_entries[key].AbsoluteBottomValue;
                for (int k = 0; k < intList2.Count; k++)
                {
                    int    index = intList2[k];
                    double num10 = isSortedVertically ? m_entries[index].AbsoluteLeftValue : m_entries[index].AbsoluteTopValue;
                    double num11 = isSortedVertically ? m_entries[index].AbsoluteRightValue : m_entries[index].AbsoluteBottomValue;
                    if ((num10 > num8 && num10 < num9) || (num11 > num8 && num11 < num9) || (num10 <= num8 && num9 <= num11) || (num8 <= num10 && num11 <= num9))
                    {
                        context.ErrorContext.Register(ProcessingErrorCode.rsOverlappingReportItems, Severity.Warning, m_entries[key].ObjectType, m_entries[key].Name, null, ErrorContext.GetLocalizedObjectTypeString(m_entries[index].ObjectType), m_entries[index].Name);
                    }
                }
            }
        }
コード例 #4
0
        internal IntList GetPeerSortFilters(bool create)
        {
            if (m_userSort == null)
            {
                return(null);
            }
            InScopeSortFilterHashtable inScopeSortFilterHashtable = null;
            IntList intList = null;

            if (m_containingScopes == null || m_containingScopes.Count == 0 || m_isSubReportTopLevelScope)
            {
                inScopeSortFilterHashtable = GetSortFiltersInScope(create, inDetail: false);
            }
            else
            {
                Grouping lastEntry = m_containingScopes.LastEntry;
                if (lastEntry == null)
                {
                    inScopeSortFilterHashtable = GetSortFiltersInScope(create, inDetail: true);
                }
                else if (m_userSort.SortExpressionScope == null)
                {
                    if (lastEntry.DetailSortFiltersInScope == null && create)
                    {
                        lastEntry.DetailSortFiltersInScope = new InScopeSortFilterHashtable();
                    }
                    inScopeSortFilterHashtable = lastEntry.DetailSortFiltersInScope;
                }
                else
                {
                    if (lastEntry.NonDetailSortFiltersInScope == null && create)
                    {
                        lastEntry.NonDetailSortFiltersInScope = new InScopeSortFilterHashtable();
                    }
                    inScopeSortFilterHashtable = lastEntry.NonDetailSortFiltersInScope;
                }
            }
            if (inScopeSortFilterHashtable != null)
            {
                int num = (m_userSort.SortExpressionScope == null) ? m_userSort.SortTarget.ID : m_userSort.SortExpressionScope.ID;
                intList = inScopeSortFilterHashtable[num];
                if (intList == null && create)
                {
                    intList = new IntList();
                    inScopeSortFilterHashtable.Add(num, intList);
                }
            }
            return(intList);
        }
コード例 #5
0
            internal bool ClearPeerSorts(int uniqueName)
            {
                bool    result  = false;
                IntList intList = null;

                for (int i = 0; i < m_collection.Count; i++)
                {
                    SortInfoStruct sortInfoStruct = (SortInfoStruct)m_collection[i];
                    Hashtable      peerSorts      = sortInfoStruct.PeerSorts;
                    if (peerSorts != null)
                    {
                        if (intList == null)
                        {
                            intList = new IntList();
                        }
                        if (peerSorts.Contains(uniqueName))
                        {
                            intList.Add(sortInfoStruct.ReportItemUniqueName);
                        }
                    }
                }
                if (intList != null)
                {
                    if (0 < intList.Count)
                    {
                        for (int j = 0; j < intList.Count; j++)
                        {
                            Remove(intList[j]);
                        }
                        result = true;
                    }
                }
                else if (m_collection.Count > 0)
                {
                    m_nameMap.Clear();
                    m_collection.Clear();
                    result = true;
                }
                return(result);
            }
コード例 #6
0
        internal ActionItemInstance(ReportProcessing.ProcessingContext pc, ActionItem actionItemDef)
        {
            ParameterValueList drillthroughParameters = actionItemDef.DrillthroughParameters;

            if (drillthroughParameters == null)
            {
                return;
            }
            m_drillthroughParametersValues = new object[drillthroughParameters.Count];
            m_drillthroughParametersOmits  = new BoolList(drillthroughParameters.Count);
            m_dataSetTokenIDs = new IntList(drillthroughParameters.Count);
            for (int i = 0; i < drillthroughParameters.Count; i++)
            {
                if (drillthroughParameters[i].Value != null && drillthroughParameters[i].Value.Type == ExpressionInfo.Types.Token)
                {
                    m_dataSetTokenIDs.Add(drillthroughParameters[i].Value.IntValue);
                }
                else
                {
                    m_dataSetTokenIDs.Add(-1);
                }
            }
        }
コード例 #7
0
 internal SortExpressionScopeInstanceHolder(SortFilterExpressionScopeObj owner)
 {
     m_owner = owner;
     m_scopeInstanceIndices = new IntList();
 }
コード例 #8
0
 internal bool PopulateRuntimeSortFilterEventInfo(ReportProcessing.ProcessingContext pc, DataSet myDataSet)
 {
     if (pc.UserSortFilterInfo == null || pc.UserSortFilterInfo.SortInfo == null || pc.OldSortFilterEventInfo == null)
     {
         return(false);
     }
     if (m_dataSetID != -1)
     {
         return(false);
     }
     m_runtimeSortFilterInfo = null;
     EventInformation.SortEventInfo sortInfo = pc.UserSortFilterInfo.SortInfo;
     for (int i = 0; i < sortInfo.Count; i++)
     {
         int uniqueNameAt = sortInfo.GetUniqueNameAt(i);
         SortFilterEventInfo sortFilterEventInfo = pc.OldSortFilterEventInfo[uniqueNameAt];
         if (sortFilterEventInfo != null && sortFilterEventInfo.EventSource.UserSort != null && sortFilterEventInfo.EventSource.UserSort.DataSetID == myDataSet.ID)
         {
             if (m_runtimeSortFilterInfo == null)
             {
                 m_runtimeSortFilterInfo = new RuntimeSortFilterEventInfoList();
             }
             m_runtimeSortFilterInfo.Add(new RuntimeSortFilterEventInfo(sortFilterEventInfo.EventSource, uniqueNameAt, sortInfo.GetSortDirectionAt(i), sortFilterEventInfo.EventSourceScopeInfo));
         }
     }
     if (m_runtimeSortFilterInfo != null)
     {
         int count = m_runtimeSortFilterInfo.Count;
         for (int j = 0; j < count; j++)
         {
             TextBox          eventSource         = m_runtimeSortFilterInfo[j].EventSource;
             ISortFilterScope sortExpressionScope = eventSource.UserSort.SortExpressionScope;
             if (sortExpressionScope != null)
             {
                 sortExpressionScope.IsSortFilterExpressionScope = SetSortFilterInfo(sortExpressionScope.IsSortFilterExpressionScope, count, j);
             }
             ISortFilterScope sortTarget = eventSource.UserSort.SortTarget;
             if (sortTarget != null)
             {
                 sortTarget.IsSortFilterTarget = SetSortFilterInfo(sortTarget.IsSortFilterTarget, count, j);
             }
             if (eventSource.ContainingScopes != null && 0 < eventSource.ContainingScopes.Count)
             {
                 int num = 0;
                 for (int k = 0; k < eventSource.ContainingScopes.Count; k++)
                 {
                     Grouping    grouping    = eventSource.ContainingScopes[k];
                     VariantList variantList = m_runtimeSortFilterInfo[j].SortSourceScopeInfo[k];
                     if (grouping != null)
                     {
                         if (grouping.SortFilterScopeInfo == null)
                         {
                             grouping.SortFilterScopeInfo = new VariantList[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]  = variantList;
                         grouping.SortFilterScopeIndex[j] = k;
                         continue;
                     }
                     SubReportList detailScopeSubReports = eventSource.UserSort.DetailScopeSubReports;
                     ReportItem    parent;
                     if (detailScopeSubReports != null && num < detailScopeSubReports.Count)
                     {
                         parent = detailScopeSubReports[num++].Parent;
                     }
                     else
                     {
                         Global.Tracer.Assert(k == eventSource.ContainingScopes.Count - 1, "(j == eventSource.ContainingScopes.Count - 1)");
                         parent = eventSource.Parent;
                     }
                     while (parent != null && !(parent is DataRegion))
                     {
                         parent = parent.Parent;
                     }
                     Global.Tracer.Assert(parent is DataRegion, "(parent is DataRegion)");
                     DataRegion dataRegion = (DataRegion)parent;
                     if (dataRegion.SortFilterSourceDetailScopeInfo == null)
                     {
                         dataRegion.SortFilterSourceDetailScopeInfo = new int[count];
                         for (int n = 0; n < count; n++)
                         {
                             dataRegion.SortFilterSourceDetailScopeInfo[n] = -1;
                         }
                     }
                     Global.Tracer.Assert(variantList != null && 1 == variantList.Count, "(null != scopeValues && 1 == scopeValues.Count)");
                     dataRegion.SortFilterSourceDetailScopeInfo[j] = (int)variantList[0];
                 }
             }
             GroupingList groupsInSortTarget = eventSource.UserSort.GroupsInSortTarget;
             if (groupsInSortTarget != null)
             {
                 for (int num2 = 0; num2 < groupsInSortTarget.Count; num2++)
                 {
                     groupsInSortTarget[num2].NeedScopeInfoForSortFilterExpression = SetSortFilterInfo(groupsInSortTarget[num2].NeedScopeInfoForSortFilterExpression, count, j);
                 }
             }
             IntList peerSortFilters = eventSource.GetPeerSortFilters(create: false);
             if (peerSortFilters == null)
             {
                 continue;
             }
             if (m_runtimeSortFilterInfo[j].PeerSortFilters == null)
             {
                 m_runtimeSortFilterInfo[j].PeerSortFilters = new Hashtable();
             }
             for (int num3 = 0; num3 < peerSortFilters.Count; num3++)
             {
                 if (eventSource.ID != peerSortFilters[num3])
                 {
                     m_runtimeSortFilterInfo[j].PeerSortFilters.Add(peerSortFilters[num3], null);
                 }
             }
         }
     }
     return(true);
 }
コード例 #9
0
 internal DrillthroughInformation(string reportName, DrillthroughParameters reportParameters, IntList dataSetTokenIDs)
 {
     m_reportName       = reportName;
     m_reportParameters = reportParameters;
     m_dataSetTokenIDs  = dataSetTokenIDs;
 }
コード例 #10
0
 internal TableRow(int id, int idForReportItems)
     : base(id)
 {
     m_reportItems = new ReportItemCollection(idForReportItems, normal: false);
     m_colSpans    = new IntList();
 }
コード例 #11
0
 internal SenderInformation(bool startHidden, int[] containerUniqueNames)
 {
     m_startHidden          = startHidden;
     m_receiverUniqueNames  = new IntList();
     m_containerUniqueNames = containerUniqueNames;
 }