Esempio n. 1
0
        List <int> IInScopeEventSource.GetPeerSortFilters(bool create)
        {
            EndUserSort userSort = ((IInScopeEventSource)this).UserSort;

            if (userSort == null)
            {
                return(null);
            }
            InScopeSortFilterHashtable inScopeSortFilterHashtable = null;
            List <int> list = null;

            if (((IInScopeEventSource)this).ContainingScopes == null || ((IInScopeEventSource)this).ContainingScopes.Count == 0 || ((IInScopeEventSource)this).IsSubReportTopLevelScope)
            {
                inScopeSortFilterHashtable = ((IInScopeEventSource)this).GetSortFiltersInScope(create, false);
            }
            else
            {
                Grouping lastEntry = ((IInScopeEventSource)this).ContainingScopes.LastEntry;
                if (lastEntry == null)
                {
                    inScopeSortFilterHashtable = ((IInScopeEventSource)this).GetSortFiltersInScope(create, true);
                }
                else if (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 = (userSort.SortExpressionScope == null) ? userSort.SortTarget.ID : userSort.SortExpressionScope.ID;
                list = inScopeSortFilterHashtable[num];
                if (list == null && create)
                {
                    list = new List <int>();
                    inScopeSortFilterHashtable.Add(num, list);
                }
            }
            return(list);
        }
Esempio n. 2
0
        InScopeSortFilterHashtable IInScopeEventSource.GetSortFiltersInScope(bool create, bool inDetail)
        {
            InScopeSortFilterHashtable inScopeSortFilterHashtable = null;
            ReportItem parent = ((IInScopeEventSource)this).Parent;

            if (inDetail)
            {
                while (parent != null && !parent.IsDataRegion)
                {
                    parent = parent.Parent;
                }
            }
            else
            {
                while (parent != null && !(parent is Report))
                {
                    parent = parent.Parent;
                }
            }
            Global.Tracer.Assert(parent.IsDataRegion || parent is Report, "(parent.IsDataRegion || parent is Report)");
            if (parent is Report)
            {
                Report report = (Report)parent;
                if (((IInScopeEventSource)this).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(null == ((IInScopeEventSource)this).UserSort.SortExpressionScope, "(null == eventSource.UserSort.SortExpressionScope)");
            DataRegion dataRegion = (DataRegion)parent;

            if (dataRegion.DetailSortFiltersInScope == null && create)
            {
                dataRegion.DetailSortFiltersInScope = new InScopeSortFilterHashtable();
            }
            return(dataRegion.DetailSortFiltersInScope);
        }
Esempio n. 3
0
        public void Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(Grouping.m_Declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.Name:
                    this.m_name = reader.ReadString();
                    break;

                case MemberName.ID:
                    this.m_ID = reader.ReadInt32();
                    break;

                case MemberName.GroupExpressions:
                    this.m_groupExpressions = reader.ReadGenericListOfRIFObjects <ExpressionInfo>();
                    break;

                case MemberName.GroupLabel:
                    this.m_groupLabel = (ExpressionInfo)reader.ReadRIFObject();
                    break;

                case MemberName.SortDirections:
                    this.m_sortDirections = reader.ReadListOfPrimitives <bool>();
                    break;

                case MemberName.PageBreakLocation:
                    this.m_pageBreak = new PageBreak();
                    this.m_pageBreak.BreakLocation = (PageBreakLocation)reader.ReadEnum();
                    break;

                case MemberName.Aggregates:
                    this.m_aggregates = reader.ReadGenericListOfRIFObjects <DataAggregateInfo>();
                    break;

                case MemberName.GroupAndSort:
                    this.m_groupAndSort = reader.ReadBoolean();
                    break;

                case MemberName.Filters:
                    this.m_filters = reader.ReadGenericListOfRIFObjects <Filter>();
                    break;

                case MemberName.ReportItemsWithHideDuplicates:
                    this.m_reportItemsWithHideDuplicates = reader.ReadGenericListOfReferences <ReportItem>(this);
                    break;

                case MemberName.Parent:
                    this.m_parent = reader.ReadGenericListOfRIFObjects <ExpressionInfo>();
                    break;

                case MemberName.RecursiveAggregates:
                    this.m_recursiveAggregates = reader.ReadGenericListOfRIFObjects <DataAggregateInfo>();
                    break;

                case MemberName.PostSortAggregates:
                    this.m_postSortAggregates = reader.ReadGenericListOfRIFObjects <DataAggregateInfo>();
                    break;

                case MemberName.DataElementName:
                    this.m_dataElementName = reader.ReadString();
                    break;

                case MemberName.DataElementOutput:
                    this.m_dataElementOutput = (DataElementOutputTypes)reader.ReadEnum();
                    break;

                case MemberName.SaveGroupExprValues:
                    this.m_saveGroupExprValues = reader.ReadBoolean();
                    break;

                case MemberName.UserSortExpressions:
                    this.m_userSortExpressions = reader.ReadGenericListOfRIFObjects <ExpressionInfo>();
                    break;

                case MemberName.NonDetailSortFiltersInScope:
                    this.m_nonDetailSortFiltersInScope = reader.ReadInt32PrimitiveListHashtable <InScopeSortFilterHashtable, int>();
                    break;

                case MemberName.DetailSortFiltersInScope:
                    this.m_detailSortFiltersInScope = reader.ReadInt32PrimitiveListHashtable <InScopeSortFilterHashtable, int>();
                    break;

                case MemberName.Variables:
                    this.m_variables = reader.ReadGenericListOfRIFObjects <Variable>();
                    break;

                case MemberName.PageBreak:
                    this.m_pageBreak = (PageBreak)reader.ReadRIFObject();
                    break;

                case MemberName.PageName:
                    this.m_pageName = (ExpressionInfo)reader.ReadRIFObject();
                    break;

                case MemberName.DomainScope:
                    this.m_domainScope = reader.ReadString();
                    break;

                case MemberName.ScopeIDForDomainScope:
                    this.m_scopeIDForDomainScope = reader.ReadInt32();
                    break;

                case MemberName.NaturalGroup:
                    this.m_naturalGroup = reader.ReadBoolean();
                    break;

                default:
                    Global.Tracer.Assert(false);
                    break;
                }
            }
        }