Exemplo n.º 1
0
 internal TablixHeading(int id, DataRegion dataRegionDef)
     : base(id, dataRegionDef)
 {
     m_aggregates          = new DataAggregateInfoList();
     m_postSortAggregates  = new DataAggregateInfoList();
     m_recursiveAggregates = new DataAggregateInfoList();
 }
Exemplo n.º 2
0
 internal PivotHeading(int id, DataRegion matrixDef)
     : base(id, matrixDef)
 {
     m_aggregates          = new DataAggregateInfoList();
     m_postSortAggregates  = new DataAggregateInfoList();
     m_recursiveAggregates = new DataAggregateInfoList();
 }
Exemplo n.º 3
0
 public int[] GetRepeatSiblings()
 {
     Microsoft.ReportingServices.ReportProcessing.DataRegion dataRegion = (Microsoft.ReportingServices.ReportProcessing.DataRegion)base.ReportItemDef;
     if (dataRegion.RepeatSiblings == null)
     {
         return(new int[0]);
     }
     int[] array = new int[dataRegion.RepeatSiblings.Count];
     dataRegion.RepeatSiblings.CopyTo(array);
     return(array);
 }
        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;
                }
            }
        }
Exemplo n.º 5
0
        private InScopeSortFilterHashtable GetSortFiltersInScope(bool create, bool inDetail)
        {
            InScopeSortFilterHashtable inScopeSortFilterHashtable = null;
            ReportItem parent = m_parent;

            if (inDetail)
            {
                while (parent != null && !(parent is DataRegion))
                {
                    parent = parent.Parent;
                }
            }
            else
            {
                while (parent != null && !(parent is Report))
                {
                    parent = parent.Parent;
                }
            }
            Global.Tracer.Assert(parent is DataRegion || parent is Report);
            if (parent is Report)
            {
                Report report = (Report)parent;
                if (m_userSort.SortExpressionScope == null)
                {
                    if (report.DetailSortFiltersInScope == null && create)
                    {
                        report.DetailSortFiltersInScope = new InScopeSortFilterHashtable();
                    }
                    return(report.DetailSortFiltersInScope);
                }
                if (report.NonDetailSortFiltersInScope == null && create)
                {
                    report.NonDetailSortFiltersInScope = new InScopeSortFilterHashtable();
                }
                return(report.NonDetailSortFiltersInScope);
            }
            Global.Tracer.Assert(m_userSort.SortExpressionScope == null);
            DataRegion dataRegion = (DataRegion)parent;

            if (dataRegion.DetailSortFiltersInScope == null && create)
            {
                dataRegion.DetailSortFiltersInScope = new InScopeSortFilterHashtable();
            }
            return(dataRegion.DetailSortFiltersInScope);
        }
Exemplo n.º 6
0
        internal void Populate(ErrorContext errorContext)
        {
            Global.Tracer.Assert(m_unpopulated);
            Global.Tracer.Assert(m_entries != null);
            Hashtable hashtable = new Hashtable();
            int       num       = -1;

            if (0 < m_entries.Count)
            {
                if (m_normal)
                {
                    m_entries.Sort();
                }
                m_nonComputedReportItems = new ReportItemList();
                m_computedReportItems    = new ReportItemList();
                m_sortedReportItemList   = new ReportItemIndexerList();
                for (int i = 0; i < m_entries.Count; i++)
                {
                    ReportItem reportItem = m_entries[i];
                    Global.Tracer.Assert(reportItem != null);
                    if (reportItem is DataRegion)
                    {
                        hashtable[reportItem.Name] = reportItem;
                    }
                    ReportItemIndexer reportItemIndexer = default(ReportItemIndexer);
                    if (reportItem.Computed)
                    {
                        reportItemIndexer.Index = m_computedReportItems.Add(reportItem);
                    }
                    else
                    {
                        reportItemIndexer.Index = m_nonComputedReportItems.Add(reportItem);
                    }
                    reportItemIndexer.IsComputed = reportItem.Computed;
                    m_sortedReportItemList.Add(reportItemIndexer);
                }
            }
            m_unpopulated = false;
            m_entries     = null;
            for (int j = 0; j < Count; j++)
            {
                ReportItem reportItem2 = this[j];
                Global.Tracer.Assert(reportItem2 != null);
                if (reportItem2.RepeatWith != null)
                {
                    if (reportItem2 is DataRegion || reportItem2 is SubReport || (reportItem2 is Rectangle && ((Rectangle)reportItem2).ContainsDataRegionOrSubReport()))
                    {
                        errorContext.Register(ProcessingErrorCode.rsInvalidRepeatWith, Severity.Error, reportItem2.ObjectType, reportItem2.Name, "RepeatWith");
                    }
                    if (!m_normal || !hashtable.ContainsKey(reportItem2.RepeatWith))
                    {
                        errorContext.Register(ProcessingErrorCode.rsRepeatWithNotPeerDataRegion, Severity.Error, reportItem2.ObjectType, reportItem2.Name, "RepeatWith", reportItem2.RepeatWith);
                    }
                    DataRegion dataRegion = (DataRegion)hashtable[reportItem2.RepeatWith];
                    if (dataRegion != null)
                    {
                        if (dataRegion.RepeatSiblings == null)
                        {
                            dataRegion.RepeatSiblings = new IntList();
                        }
                        dataRegion.RepeatSiblings.Add(j);
                    }
                }
                if (m_linkToChildName != null && num < 0 && reportItem2.Name.Equals(m_linkToChildName, StringComparison.Ordinal))
                {
                    num = j;
                    ((Rectangle)reportItem2.Parent).LinkToChild = j;
                }
            }
        }
Exemplo n.º 7
0
 internal ReportHierarchyNode(int id, DataRegion dataRegionDef)
     : base(id)
 {
     m_dataRegionDef = dataRegionDef;
 }
 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);
 }