Exemple #1
0
        private PageBreakLocation CalculatePropagatedPageBreak(DataRegionMemberCollection <TablixMember> members, bool thisOrAnscestorHasToggle, bool isTable)
        {
            PageBreakLocation result          = PageBreakLocation.None;
            bool             flag             = false;
            ShimTablixMember shimTablixMember = null;
            int num = 0;

            while (num < members.Count)
            {
                ShimTablixMember shimTablixMember2 = (ShimTablixMember)((ReportElementCollectionBase <TablixMember>)members)[num];
                if (shimTablixMember2.IsStatic)
                {
                    if (isTable)
                    {
                        if (shimTablixMember2.RepeatOnNewPage)
                        {
                            flag = true;
                        }
                    }
                    else if (shimTablixMember2.Children != null && shimTablixMember2.Children.Count > 0)
                    {
                        result = this.CalculatePropagatedPageBreak(shimTablixMember2.Children, thisOrAnscestorHasToggle, false);
                    }
                    num++;
                    continue;
                }
                shimTablixMember = shimTablixMember2;
                break;
            }
            if (shimTablixMember != null)
            {
                thisOrAnscestorHasToggle |= (shimTablixMember.Visibility != null && shimTablixMember.Visibility.HiddenState == SharedHiddenState.Sometimes);
                PageBreakLocation pageBreakLocation = PageBreakLocation.None;
                AspNetCore.ReportingServices.ReportRendering.Group currentShimRenderGroup = shimTablixMember.Group.CurrentShimRenderGroup;
                if (currentShimRenderGroup != null)
                {
                    pageBreakLocation = PageBreakHelper.GetPageBreakLocation(currentShimRenderGroup.PageBreakAtStart, currentShimRenderGroup.PageBreakAtEnd);
                }
                if (shimTablixMember.Children != null)
                {
                    pageBreakLocation = PageBreakHelper.MergePageBreakLocations(this.CalculatePropagatedPageBreak(shimTablixMember.Children, thisOrAnscestorHasToggle, isTable), pageBreakLocation);
                }
                shimTablixMember.SetPropagatedPageBreak(pageBreakLocation);
                if ((!isTable || flag) && pageBreakLocation != 0)
                {
                    if (!thisOrAnscestorHasToggle)
                    {
                        result = pageBreakLocation;
                    }
                    shimTablixMember.SetPropagatedPageBreak(PageBreakLocation.Between);
                }
            }
            return(result);
        }
Exemple #2
0
        private void CalculatePropagatedPageBreak()
        {
            AspNetCore.ReportingServices.ReportRendering.DataRegion dataRegion = (AspNetCore.ReportingServices.ReportRendering.DataRegion)base.m_owner.RenderReportItem;
            bool thisOrAnscestorHasToggle       = dataRegion.SharedHidden == AspNetCore.ReportingServices.ReportRendering.SharedHiddenState.Sometimes;
            PageBreakLocation pageBreakLocation = PageBreakHelper.GetPageBreakLocation(dataRegion.PageBreakAtStart, dataRegion.PageBreakAtEnd);

            if (base.m_members != null && base.m_members.Count > 0)
            {
                pageBreakLocation = PageBreakHelper.MergePageBreakLocations(this.CalculatePropagatedPageBreak(base.m_members, thisOrAnscestorHasToggle, this.OwnerTablix.SnapshotTablixType == DataRegion.Type.Table), pageBreakLocation);
            }
            this.OwnerTablix.SetPageBreakLocation(pageBreakLocation);
        }