Exemplo n.º 1
0
        protected override void CreateChildren(PageContext pageContext)
        {
            ReportSectionCollection reportSections = (base.m_source as AspNetCore.ReportingServices.OnDemandReportRendering.SubReport).Report.ReportSections;
            int count = reportSections.Count;

            base.m_children           = new PageItem[count];
            base.m_indexesLeftToRight = new int[count];
            base.m_rightPadding       = 0.0;
            base.m_bottomPadding      = 0.0;
            double num = 0.0;

            for (int i = 0; i < count; i++)
            {
                ReportBody reportBody = new ReportBody(((ReportElementCollectionBase <AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection>)reportSections)[i].Body, ((ReportElementCollectionBase <AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection>)reportSections)[i].Width);
                reportBody.CacheNonSharedProperties(pageContext);
                reportBody.ItemPageSizes.Top = num;
                base.m_indexesLeftToRight[i] = i;
                num += reportBody.ItemPageSizes.Height;
                if (i > 0)
                {
                    List <int> list = new List <int>(1);
                    list.Add(i - 1);
                    reportBody.PageItemsAbove = list;
                }
                base.m_children[i] = reportBody;
            }
        }
Exemplo n.º 2
0
 public ColumnDetail(double leftEdge, double topEdge, ReportBody reportBody)
 {
     this.m_left    = leftEdge;
     this.m_top     = topEdge;
     this.m_width   = reportBody.ItemPageSizes.Width;
     this.m_height  = reportBody.ItemPageSizes.Height;
     this.m_offset  = reportBody.Offset;
     this.m_element = (RPLBody)reportBody.RPLElement;
 }
Exemplo n.º 3
0
 protected override void DetermineContentHorizontalSize(PageContext pageContext, double leftInParentSystem, double rightInParentSystem, List <PageItem> ancestors, bool anyAncestorHasKT, bool hasUnpinnedAncestors, bool resolveState, bool resolveItem)
 {
     base.DetermineContentHorizontalSize(pageContext, leftInParentSystem, rightInParentSystem, ancestors, anyAncestorHasKT, hasUnpinnedAncestors, resolveState, resolveItem);
     if (base.m_children.Length > 1)
     {
         for (int i = 0; i < base.m_children.Length; i++)
         {
             ReportBody reportBody = base.m_children[i] as ReportBody;
             if (reportBody != null)
             {
                 if (!reportBody.OnThisVerticalPage)
                 {
                     break;
                 }
                 if (reportBody.ItemPageSizes.Width < base.m_itemPageSizes.Width)
                 {
                     reportBody.ItemPageSizes.Width = base.m_itemPageSizes.Width;
                 }
             }
         }
     }
 }
        private static List <Declaration> BuildDeclarations()
        {
            List <Declaration> list = new List <Declaration>(30);

            list.Add(PageItem.GetDeclaration());
            list.Add(PageItemContainer.GetDeclaration());
            list.Add(ItemSizes.GetDeclaration());
            list.Add(HiddenPageItem.GetDeclaration());
            list.Add(NoRowsItem.GetDeclaration());
            list.Add(SubReport.GetDeclaration());
            list.Add(ReportBody.GetDeclaration());
            list.Add(Rectangle.GetDeclaration());
            list.Add(TextBox.GetDeclaration());
            list.Add(TextBox.TextBoxOffset.GetDeclaration());
            list.Add(Paragraph.GetDeclaration());
            list.Add(TextRun.GetDeclaration());
            list.Add(Line.GetDeclaration());
            list.Add(DynamicImage.GetDeclaration());
            list.Add(Chart.GetDeclaration());
            list.Add(GaugePanel.GetDeclaration());
            list.Add(Image.GetDeclaration());
            list.Add(Tablix.GetDeclaration());
            list.Add(Tablix.RowInfo.GetDeclaration());
            list.Add(Tablix.SizeInfo.GetDeclaration());
            list.Add(Tablix.ColumnInfo.GetDeclaration());
            list.Add(Tablix.PageTalixCell.GetDeclaration());
            list.Add(Tablix.PageDetailCell.GetDeclaration());
            list.Add(Tablix.PageCornerCell.GetDeclaration());
            list.Add(Tablix.PageMemberCell.GetDeclaration());
            list.Add(Tablix.PageStructMemberCell.GetDeclaration());
            list.Add(Tablix.PageStructStaticMemberCell.GetDeclaration());
            list.Add(Tablix.PageStructDynamicMemberCell.GetDeclaration());
            list.Add(Map.GetDeclaration());
            list.Add(PageBreakProperties.GetDeclaration());
            return(list);
        }
Exemplo n.º 5
0
        public double NextPage(RPLWriter rplWriter, int pageNumber, int totalPages, double top, double availableHeight, ReportSection nextSection, bool isFirstSectionOnPage)
        {
            double num  = 0.0;
            bool   flag = nextSection == null;

            if (!flag)
            {
                SectionPaginationSettings sectionPaginationSettings = nextSection.SectionPaginationSettings;
                num = 12.699999809265137 + sectionPaginationSettings.FooterHeight;
                PageSection pageHeader = nextSection.ROMReportSection.Page.PageHeader;
                if (pageHeader != null && pageHeader.PrintBetweenSections)
                {
                    num += sectionPaginationSettings.HeaderHeight;
                }
            }
            double      num2        = 0.0;
            PageSection pageHeader2 = this.m_reportSection.Page.PageHeader;
            PageSection pageFooter  = this.m_reportSection.Page.PageFooter;
            bool        flag2       = pageHeader2 != null && pageHeader2.PrintBetweenSections;
            bool        flag3       = pageFooter != null && pageFooter.PrintBetweenSections;

            this.m_needsHeaderHeight = (isFirstSectionOnPage ? (pageHeader2 != null) : flag2);
            if (this.m_needsHeaderHeight)
            {
                num2            += this.m_sectionPageSettings.HeaderHeight;
                availableHeight -= num2;
            }
            if (pageFooter != null)
            {
                availableHeight -= this.m_sectionPageSettings.FooterHeight;
            }
            bool flag4 = false;
            bool flag5 = false;

            this.m_reportSection.SetPage(this.m_pageContext.PageNumberRegion, this.m_pageContext.Common.GetTotalPagesRegion(pageNumber), pageNumber, totalPages);
            bool needsReportItemsOnPage = this.m_reportSection.NeedsReportItemsOnPage;
            bool flag6 = this.m_pageContext.PropertyCacheState != PageContext.CacheState.CountPages;

            this.m_pageContext.EvaluatePageHeaderFooter = false;
            if (needsReportItemsOnPage && flag6)
            {
                if (flag2 && !isFirstSectionOnPage)
                {
                    goto IL_015f;
                }
                if (this.HasHeaderOnPage(pageNumber, totalPages))
                {
                    goto IL_015f;
                }
                goto IL_0162;
            }
            goto IL_018a;
IL_018a:
            if (rplWriter != null)
            {
                this.m_columns = new List <ColumnDetail>(this.m_sectionPageSettings.Columns);
                this.WriteStartItemToStream(rplWriter);
            }
            long num3 = 0L;

            if (!this.Done)
            {
                double columnWidth = this.m_sectionPageSettings.ColumnWidth;
                this.m_pageContext.Common.Pagination.CurrentColumnWidth = columnWidth;
                this.m_columnHeight = availableHeight;
                this.m_pageContext.Common.Pagination.CurrentColumnHeight = this.m_columnHeight;
                int           num4           = 0;
                int           columns        = this.m_sectionPageSettings.Columns;
                RoundedDouble roundedDouble  = new RoundedDouble(this.m_topEdge);
                RoundedDouble roundedDouble2 = new RoundedDouble(this.m_leftEdge);
                this.m_pageContext.VerticalPageNumber = this.m_verticalPageNumber;
                while (num4 < columns)
                {
                    bool flag7 = false;
                    if (this.m_leftEdge == 0.0)
                    {
                        if (this.m_pageContext.TextBoxDuplicates != null)
                        {
                            this.m_pageContext.TextBoxDuplicates = null;
                            this.m_reportBody.ResolveDuplicates(this.m_pageContext, this.m_topEdge, null, false);
                        }
                        this.m_reportBody.CalculateVertical(this.m_pageContext, this.m_topEdge, this.m_topEdge + availableHeight, null, new List <PageItem>(), ref flag7, false);
                        this.m_verticalPageNumber++;
                        this.m_pageContext.VerticalPageNumber = this.m_verticalPageNumber;
                    }
                    flag7 = false;
                    this.m_reportBody.CalculateHorizontal(this.m_pageContext, this.m_leftEdge, this.m_leftEdge + columnWidth, null, new List <PageItem>(), ref flag7, false);
                    num3 = this.m_pageContext.PropertyCacheWriter.BaseStream.Position;
                    this.m_reportBody.AddToPage(rplWriter, this.m_pageContext, this.m_leftEdge, this.m_topEdge, this.m_leftEdge + columnWidth, this.m_topEdge + availableHeight, PageItem.RepeatState.None);
                    if (rplWriter != null)
                    {
                        rplWriter.RegisterSectionItemizedData();
                    }
                    this.m_pageContext.PropertyCacheWriter.BaseStream.Seek(num3, SeekOrigin.Begin);
                    if (rplWriter != null)
                    {
                        this.m_columns.Add(new ColumnDetail(0.0 - this.m_leftEdge, 0.0 - this.m_topEdge, this.m_reportBody));
                    }
                    this.m_leftEdge     += columnWidth;
                    roundedDouble2.Value = this.m_leftEdge;
                    if (num4 == 0 && this.m_reportBody.ItemPageSizes.Bottom - this.m_topEdge < availableHeight)
                    {
                        this.m_columnHeight = this.m_reportBody.ItemPageSizes.Bottom - this.m_topEdge;
                    }
                    if (roundedDouble2 >= this.m_reportBody.ItemPageSizes.Width)
                    {
                        this.m_leftEdge     = 0.0;
                        this.m_topEdge     += availableHeight;
                        roundedDouble.Value = this.m_topEdge;
                        this.m_reportBody.ResetHorizontal(true, null);
                        this.m_pageContext.Common.PaginatingHorizontally = false;
                    }
                    else
                    {
                        this.m_pageContext.Common.PaginatingHorizontally = true;
                    }
                    num4++;
                    if (roundedDouble >= this.m_reportBody.ItemPageSizes.Bottom)
                    {
                        this.m_reportBody = null;
                        this.m_topEdge    = 0.0;
                        this.m_leftEdge   = 0.0;
                        break;
                    }
                }
            }
            double num5 = availableHeight - this.m_columnHeight;

            if (this.Done && !flag && pageFooter != null && !flag3)
            {
                num5 += this.m_sectionPageSettings.FooterHeight;
            }
            bool flag8 = false;

            if (num5 < num || flag)
            {
                this.m_columnHeight = availableHeight;
                flag8 = true;
                num2 += this.m_sectionPageSettings.FooterHeight;
            }
            else if (flag3)
            {
                num2 += this.m_sectionPageSettings.FooterHeight;
            }
            this.m_itemPageSizes.Height = num2 + this.m_columnHeight;
            this.m_itemPageSizes.Top    = top;
            this.WriteColumns(rplWriter);
            this.m_columns = null;
            if (this.Done && flag && totalPages == 0)
            {
                totalPages = pageNumber;
            }
            if (flag6)
            {
                flag4 = ((!isFirstSectionOnPage) ? flag2 : this.HasHeaderOnPage(pageNumber, totalPages));
                flag5 = ((!flag8) ? flag3 : this.HasFooterOnPage(pageNumber, totalPages));
            }
            if (flag4 || flag5)
            {
                this.m_pageContext.Common.CheckPageNameChanged();
                this.m_reportSection.SetPageName(this.m_pageContext.PageName);
                this.m_reportSection.GetPageSections();
                if (flag4 && !this.IsHeaderUnknown(isFirstSectionOnPage, pageNumber, totalPages))
                {
                    this.RenderHeader(rplWriter);
                }
                else
                {
                    this.m_header = null;
                    flag4         = false;
                }
                if (flag5)
                {
                    this.RenderFooter(rplWriter);
                }
                else
                {
                    this.m_footer = null;
                }
                if (rplWriter != null && (flag4 || flag5))
                {
                    rplWriter.RegisterSectionHeaderFooter();
                }
            }
            if (!this.IsHeaderUnknown(isFirstSectionOnPage, pageNumber, totalPages))
            {
                this.WriteEndItemToStream(rplWriter);
                this.m_wroteEndToStream = true;
            }
            else
            {
                this.m_wroteEndToStream = false;
            }
            if (rplWriter != null)
            {
                rplWriter.RegisterPageItemizedData();
            }
            return(this.m_itemPageSizes.Height);

IL_015f:
            flag4 = true;
            goto IL_0162;
IL_0162:
            if (this.HasFooterOnPage(pageNumber, totalPages) || (flag3 && !flag))
            {
                flag5 = true;
            }
            if (flag4 || flag5)
            {
                this.m_pageContext.EvaluatePageHeaderFooter = true;
            }
            goto IL_018a;
        }
Exemplo n.º 6
0
 public void SetContext()
 {
     this.m_reportBody = new ReportBody(this.m_reportSection.Body, this.m_reportSection.Width);
 }
        public bool TryCreateObject(ObjectType objectType, out IPersistable persistObj)
        {
            switch (objectType)
            {
            case ObjectType.ItemSizes:
                persistObj = new ItemSizes();
                break;

            case ObjectType.PageBreakProperties:
                persistObj = new PageBreakProperties();
                break;

            case ObjectType.HiddenPageItem:
                persistObj = new HiddenPageItem();
                break;

            case ObjectType.NoRowsItem:
                persistObj = new NoRowsItem();
                break;

            case ObjectType.SubReport:
                persistObj = new SubReport();
                break;

            case ObjectType.ReportBody:
                persistObj = new ReportBody();
                break;

            case ObjectType.Rectangle:
                persistObj = new Rectangle();
                break;

            case ObjectType.TextBox:
                persistObj = new TextBox();
                break;

            case ObjectType.Paragraph:
                persistObj = new Paragraph();
                break;

            case ObjectType.TextRun:
                persistObj = new TextRun();
                break;

            case ObjectType.TextBoxOffset:
                persistObj = new TextBox.TextBoxOffset();
                break;

            case ObjectType.Line:
                persistObj = new Line();
                break;

            case ObjectType.Chart:
                persistObj = new Chart();
                break;

            case ObjectType.GaugePanel:
                persistObj = new GaugePanel();
                break;

            case ObjectType.Map:
                persistObj = new Map();
                break;

            case ObjectType.Image:
                persistObj = new Image();
                break;

            case ObjectType.Tablix:
                persistObj = new Tablix();
                break;

            case ObjectType.RowInfo:
                persistObj = new Tablix.RowInfo();
                break;

            case ObjectType.SizeInfo:
                persistObj = new Tablix.SizeInfo();
                break;

            case ObjectType.ColumnInfo:
                persistObj = new Tablix.ColumnInfo();
                break;

            case ObjectType.PageDetailCell:
                persistObj = new Tablix.PageDetailCell();
                break;

            case ObjectType.PageCornerCell:
                persistObj = new Tablix.PageCornerCell();
                break;

            case ObjectType.PageMemberCell:
                persistObj = new Tablix.PageMemberCell();
                break;

            case ObjectType.PageStructStaticMemberCell:
                persistObj = new Tablix.PageStructStaticMemberCell();
                break;

            case ObjectType.PageStructDynamicMemberCell:
                persistObj = new Tablix.PageStructDynamicMemberCell();
                break;

            default:
                persistObj = null;
                return(false);
            }
            return(true);
        }