コード例 #1
0
 public void AddSortInfoIndex(int sortInfoIndex, RuntimeSortFilterEventInfo sortInfo)
 {
     Global.Tracer.Assert(sortInfo.EventSource.UserSort.SortExpressionScope == null || !sortInfo.TargetSortFilterInfoAdded);
     if (this.m_sortFilterInfoIndices == null)
     {
         this.m_sortFilterInfoIndices = new IntList();
     }
     this.m_sortFilterInfoIndices.Add(sortInfoIndex);
     sortInfo.TargetSortFilterInfoAdded = true;
 }
コード例 #2
0
 public void CopyTo(IntList target)
 {
     if (target != null)
     {
         target.Clear();
         for (int i = 0; i < this.Count; i++)
         {
             target.Add(this[i]);
         }
     }
 }
コード例 #3
0
        public IntList GetPeerSortFilters(bool create)
        {
            if (this.m_userSort == null)
            {
                return(null);
            }
            InScopeSortFilterHashtable inScopeSortFilterHashtable = null;
            IntList intList = null;

            if (this.m_containingScopes == null || this.m_containingScopes.Count == 0 || this.m_isSubReportTopLevelScope)
            {
                inScopeSortFilterHashtable = this.GetSortFiltersInScope(create, false);
            }
            else
            {
                Grouping lastEntry = this.m_containingScopes.LastEntry;
                if (lastEntry == null)
                {
                    inScopeSortFilterHashtable = this.GetSortFiltersInScope(create, true);
                }
                else if (this.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 = (this.m_userSort.SortExpressionScope == null) ? this.m_userSort.SortTarget.ID : this.m_userSort.SortExpressionScope.ID;
                intList = inScopeSortFilterHashtable[num];
                if (intList == null && create)
                {
                    intList = new IntList();
                    inScopeSortFilterHashtable.Add(num, intList);
                }
            }
            return(intList);
        }
コード例 #4
0
            public bool ClearPeerSorts(int uniqueName)
            {
                bool    result  = false;
                IntList intList = null;

                for (int i = 0; i < this.m_collection.Count; i++)
                {
                    SortInfoStruct sortInfoStruct = (SortInfoStruct)this.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++)
                        {
                            this.Remove(intList[j]);
                        }
                        result = true;
                    }
                }
                else if (this.m_collection.Count > 0)
                {
                    this.m_nameMap.Clear();
                    this.m_collection.Clear();
                    result = true;
                }
                return(result);
            }
コード例 #5
0
        public ActionItemInstance(ReportProcessing.ProcessingContext pc, ActionItem actionItemDef)
        {
            ParameterValueList drillthroughParameters = actionItemDef.DrillthroughParameters;

            if (drillthroughParameters != null)
            {
                this.m_drillthroughParametersValues = new object[drillthroughParameters.Count];
                this.m_drillthroughParametersOmits  = new BoolList(drillthroughParameters.Count);
                this.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)
                    {
                        this.m_dataSetTokenIDs.Add(drillthroughParameters[i].Value.IntValue);
                    }
                    else
                    {
                        this.m_dataSetTokenIDs.Add(-1);
                    }
                }
            }
        }
コード例 #6
0
 public TableRow(int id, int idForReportItems)
     : base(id)
 {
     this.m_reportItems = new ReportItemCollection(idForReportItems, false);
     this.m_colSpans    = new IntList();
 }
コード例 #7
0
 public SortExpressionScopeInstanceHolder(SortFilterExpressionScopeObj owner)
 {
     this.m_owner = owner;
     this.m_scopeInstanceIndices = new IntList();
 }
コード例 #8
0
 public DrillthroughInformation(string reportName, DrillthroughParameters reportParameters, IntList dataSetTokenIDs)
 {
     this.m_reportName       = reportName;
     this.m_reportParameters = reportParameters;
     this.m_dataSetTokenIDs  = dataSetTokenIDs;
 }
コード例 #9
0
 public SenderInformation(bool startHidden, int[] containerUniqueNames)
 {
     this.m_startHidden          = startHidden;
     this.m_receiverUniqueNames  = new IntList();
     this.m_containerUniqueNames = containerUniqueNames;
 }
コード例 #10
0
 public bool PopulateRuntimeSortFilterEventInfo(ReportProcessing.ProcessingContext pc, DataSet myDataSet)
 {
     if (pc.UserSortFilterInfo != null && pc.UserSortFilterInfo.SortInfo != null && pc.OldSortFilterEventInfo != null)
     {
         if (this.m_dataSetID != -1)
         {
             return(false);
         }
         this.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 (this.m_runtimeSortFilterInfo == null)
                 {
                     this.m_runtimeSortFilterInfo = new RuntimeSortFilterEventInfoList();
                 }
                 this.m_runtimeSortFilterInfo.Add(new RuntimeSortFilterEventInfo(sortFilterEventInfo.EventSource, uniqueNameAt, sortInfo.GetSortDirectionAt(i), sortFilterEventInfo.EventSourceScopeInfo));
             }
         }
         if (this.m_runtimeSortFilterInfo != null)
         {
             int count = this.m_runtimeSortFilterInfo.Count;
             for (int j = 0; j < count; j++)
             {
                 TextBox          eventSource         = this.m_runtimeSortFilterInfo[j].EventSource;
                 ISortFilterScope sortExpressionScope = eventSource.UserSort.SortExpressionScope;
                 if (sortExpressionScope != null)
                 {
                     sortExpressionScope.IsSortFilterExpressionScope = this.SetSortFilterInfo(sortExpressionScope.IsSortFilterExpressionScope, count, j);
                 }
                 ISortFilterScope sortTarget = eventSource.UserSort.SortTarget;
                 if (sortTarget != null)
                 {
                     sortTarget.IsSortFilterTarget = this.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 = this.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;
                         }
                         else
                         {
                             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)((ArrayList)variantList)[0];
                         }
                     }
                 }
                 GroupingList groupsInSortTarget = eventSource.UserSort.GroupsInSortTarget;
                 if (groupsInSortTarget != null)
                 {
                     for (int num3 = 0; num3 < groupsInSortTarget.Count; num3++)
                     {
                         groupsInSortTarget[num3].NeedScopeInfoForSortFilterExpression = this.SetSortFilterInfo(groupsInSortTarget[num3].NeedScopeInfoForSortFilterExpression, count, j);
                     }
                 }
                 IntList peerSortFilters = eventSource.GetPeerSortFilters(false);
                 if (peerSortFilters != null)
                 {
                     if (this.m_runtimeSortFilterInfo[j].PeerSortFilters == null)
                     {
                         this.m_runtimeSortFilterInfo[j].PeerSortFilters = new Hashtable();
                     }
                     for (int num4 = 0; num4 < peerSortFilters.Count; num4++)
                     {
                         if (eventSource.ID != peerSortFilters[num4])
                         {
                             this.m_runtimeSortFilterInfo[j].PeerSortFilters.Add(peerSortFilters[num4], null);
                         }
                     }
                 }
             }
         }
         return(true);
     }
     return(false);
 }
コード例 #11
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 ? this.m_entries[num].AbsoluteBottomValue : this.m_entries[num].AbsoluteRightValue;
                bool   flag = true;
                for (int j = i + 1; j < count; j++)
                {
                    if (!flag)
                    {
                        break;
                    }
                    int num3 = sortedTop[j];
                    Global.Tracer.Assert(num != num3, "(currentIndex != peerIndex)");
                    double num4 = isSortedVertically ? this.m_entries[num3].AbsoluteTopValue : this.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 ? this.m_entries[key].AbsoluteLeftValue : this.m_entries[key].AbsoluteTopValue;
                double  num9     = isSortedVertically ? this.m_entries[key].AbsoluteRightValue : this.m_entries[key].AbsoluteBottomValue;
                for (int k = 0; k < intList2.Count; k++)
                {
                    int    index = intList2[k];
                    double num10 = isSortedVertically ? this.m_entries[index].AbsoluteLeftValue : this.m_entries[index].AbsoluteTopValue;
                    double num11 = isSortedVertically ? this.m_entries[index].AbsoluteRightValue : this.m_entries[index].AbsoluteBottomValue;
                    if (num10 > num8 && num10 < num9)
                    {
                        goto IL_023a;
                    }
                    if (num11 > num8 && num11 < num9)
                    {
                        goto IL_023a;
                    }
                    if (num10 <= num8 && num9 <= num11)
                    {
                        goto IL_023a;
                    }
                    if (num8 <= num10 && num11 <= num9)
                    {
                        goto IL_023a;
                    }
                    continue;
IL_023a:
                    context.ErrorContext.Register(ProcessingErrorCode.rsOverlappingReportItems, Severity.Warning, this.m_entries[key].ObjectType, this.m_entries[key].Name, null, ErrorContext.GetLocalizedObjectTypeString(this.m_entries[index].ObjectType), this.m_entries[index].Name);
                }
            }
        }