Ejemplo n.º 1
0
 public override void RegisterTextBoxes(RPLWriter rplWriter, PageContext pageContext)
 {
     if (rplWriter != null && this.m_textBoxValues != null && !pageContext.Common.InSubReport)
     {
         if (rplWriter.DelayedTBLevels == 0)
         {
             foreach (string key in this.m_textBoxValues.Keys)
             {
                 List <object> list = this.m_textBoxValues[key];
                 foreach (object item in list)
                 {
                     pageContext.AddTextBox(key, item);
                 }
             }
         }
         else
         {
             rplWriter.AddTextBoxes(this.m_textBoxValues);
         }
     }
 }
Ejemplo n.º 2
0
        public override void WriteCustomSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext)
        {
            AspNetCore.ReportingServices.OnDemandReportRendering.Image image = (AspNetCore.ReportingServices.OnDemandReportRendering.Image)base.m_source;
            switch (image.Sizing)
            {
            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.Clip:
                spbifWriter.Write((byte)41);
                spbifWriter.Write((byte)3);
                break;

            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.Fit:
                spbifWriter.Write((byte)41);
                spbifWriter.Write((byte)1);
                break;

            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.FitProportional:
                spbifWriter.Write((byte)41);
                spbifWriter.Write((byte)2);
                break;
            }
        }
 public void WriteItemStyle(RPLWriter rplWriter, PageContext pageContext)
 {
     if (rplWriter != null)
     {
         Style style = this.m_source.Style;
         if (style != null)
         {
             BinaryWriter binaryWriter = rplWriter.BinaryWriter;
             if (binaryWriter != null)
             {
                 base.WriteSharedStyle(binaryWriter, style, pageContext);
                 StyleInstance style2 = this.m_source.Instance.Style;
                 if (style2 != null)
                 {
                     this.WriteNonSharedStyleWithoutTag(binaryWriter, style, style2, pageContext);
                 }
                 binaryWriter.Write((byte)255);
             }
             else
             {
                 RPLPageLayout pageLayout = this.m_pageLayout;
                 if (pageLayout != null)
                 {
                     RPLStyleProps rPLStyleProps  = base.WriteSharedStyle(style, pageContext);
                     RPLStyleProps rPLStyleProps2 = null;
                     StyleInstance style3         = this.m_source.Instance.Style;
                     if (style3 != null)
                     {
                         rPLStyleProps2 = this.WriteNonSharedStyle(style, style3, pageContext);
                     }
                     if (rPLStyleProps == null && rPLStyleProps2 == null)
                     {
                         return;
                     }
                     pageLayout.Style = new RPLElementStyle(rPLStyleProps2, rPLStyleProps);
                 }
             }
         }
     }
 }
Ejemplo n.º 4
0
 public override void WriteStartItemToStream(RPLWriter rplWriter, PageContext pageContext)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             long   position   = baseStream.Position;
             binaryWriter.Write((byte)9);
             base.WriteElementProps(binaryWriter, rplWriter, pageContext, position + 1);
             base.m_offset = baseStream.Position;
             binaryWriter.Write((byte)254);
             binaryWriter.Write(position);
             binaryWriter.Write((byte)255);
         }
         else if (base.m_rplElement == null)
         {
             base.m_rplElement = new RPLImage();
             base.WriteElementProps(base.m_rplElement.ElementProps, pageContext);
         }
     }
 }
Ejemplo n.º 5
0
 public override void WriteStartItemToStream(RPLWriter rplWriter, PageContext pageContext)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             base.m_offset = baseStream.Position;
             binaryWriter.Write(this.RPLFormatType);
             base.WriteElementProps(binaryWriter, rplWriter, pageContext, base.m_offset + 1);
         }
         else if (base.m_rplElement == null)
         {
             base.m_rplElement = this.CreateRPLElement();
             base.WriteElementProps(base.m_rplElement.ElementProps, pageContext);
         }
         else
         {
             base.m_rplElement = this.CreateRPLElement(base.m_rplElement.ElementProps, pageContext);
         }
     }
 }
Ejemplo n.º 6
0
 public override void WriteStartItemToStream(RPLWriter rplWriter, PageContext pageContext)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             base.m_offset = baseStream.Position;
             binaryWriter.Write((byte)12);
             base.WriteElementProps(binaryWriter, rplWriter, pageContext, base.m_offset + 1);
         }
         else if (base.m_rplElement == null)
         {
             base.m_rplElement = new RPLSubReport();
             base.WriteElementProps(base.m_rplElement.ElementProps, pageContext);
         }
         else
         {
             RPLItemProps rplElementProps = base.m_rplElement.ElementProps as RPLItemProps;
             base.m_rplElement = new RPLSubReport(rplElementProps);
         }
     }
 }
Ejemplo n.º 7
0
 public void WriteStartItemToStream(RPLWriter rplWriter)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             this.m_offset     = baseStream.Position;
             this.m_pageOffset = baseStream.Position;
             binaryWriter.Write((byte)21);
             binaryWriter.Write((byte)22);
             binaryWriter.Write((byte)0);
             binaryWriter.Write(this.m_reportSection.ID);
             binaryWriter.Write((byte)1);
             binaryWriter.Write(this.m_sectionPageSettings.Columns);
             binaryWriter.Write((byte)2);
             binaryWriter.Write((float)this.m_sectionPageSettings.ColumnSpacing);
             binaryWriter.Write((byte)255);
             this.m_columnsOffset = baseStream.Position;
             binaryWriter.Write((byte)20);
         }
     }
 }
Ejemplo n.º 8
0
 public void WriteEndItemToStream(RPLWriter rplWriter)
 {
     if (rplWriter != null)
     {
         PageHeadFoot header = this.m_header;
         this.m_header = null;
         PageHeadFoot footer = this.m_footer;
         this.m_footer = null;
         bool needsHeaderHeight = this.m_needsHeaderHeight;
         this.m_needsHeaderHeight = false;
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             rplWriter.BinaryWriter.Write((byte)255);
             Stream baseStream = binaryWriter.BaseStream;
             long   position   = baseStream.Position;
             binaryWriter.Write((byte)16);
             binaryWriter.Write(this.m_pageOffset);
             binaryWriter.Write(1 + ((header != null) ? 1 : 0) + ((footer != null) ? 1 : 0));
             binaryWriter.Write((float)this.m_pageSettings.MarginLeft);
             if (needsHeaderHeight)
             {
                 binaryWriter.Write((float)this.m_sectionPageSettings.HeaderHeight);
             }
             else
             {
                 binaryWriter.Write(0f);
             }
             binaryWriter.Write((float)(this.m_pageSettings.PhysicalPageWidth - this.m_pageSettings.MarginLeft - this.m_pageSettings.MarginRight));
             binaryWriter.Write((float)this.m_columnHeight);
             binaryWriter.Write(0);
             binaryWriter.Write((byte)0);
             binaryWriter.Write(this.m_columnsOffset);
             if (header != null)
             {
                 header.WritePageItemSizes(binaryWriter);
             }
             if (footer != null)
             {
                 footer.WritePageItemSizes(binaryWriter);
             }
             this.m_offset = baseStream.Position;
             binaryWriter.Write((byte)254);
             binaryWriter.Write(position);
             binaryWriter.Write((byte)255);
         }
         else
         {
             this.m_rplElement.BodyArea = new RPLMeasurement();
             float top = 0f;
             if (needsHeaderHeight)
             {
                 top = (float)this.m_sectionPageSettings.HeaderHeight;
             }
             this.m_rplElement.BodyArea.Top    = top;
             this.m_rplElement.BodyArea.Height = (float)this.m_columnHeight;
             if (header != null)
             {
                 this.m_rplElement.Header = header.WritePageItemSizes();
             }
             if (footer != null)
             {
                 this.m_rplElement.Footer = footer.WritePageItemSizes();
             }
         }
     }
 }
Ejemplo n.º 9
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;
        }
 public override void WriteStartItemToStream(RPLWriter rplWriter, PageContext pageContext)
 {
 }
Ejemplo n.º 11
0
 public void WriteStartItemToStream(RPLWriter rplWriter)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter   = rplWriter.BinaryWriter;
         string       reportLanguage = Report.GetReportLanguage(this.m_report);
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             this.m_offset = baseStream.Position;
             binaryWriter.Write((byte)0);
             binaryWriter.Write((byte)2);
             if (this.m_report.Name != null)
             {
                 binaryWriter.Write((byte)15);
                 binaryWriter.Write(this.m_report.Name);
             }
             if (this.m_report.Description != null)
             {
                 binaryWriter.Write((byte)9);
                 binaryWriter.Write(this.m_report.Description);
             }
             if (this.m_report.Author != null)
             {
                 binaryWriter.Write((byte)13);
                 binaryWriter.Write(this.m_report.Author);
             }
             if (this.m_report.AutoRefresh > 0)
             {
                 binaryWriter.Write((byte)14);
                 binaryWriter.Write(this.m_report.AutoRefresh);
             }
             DateTime executionTime = this.m_report.ExecutionTime;
             binaryWriter.Write((byte)12);
             binaryWriter.Write(executionTime.ToBinary());
             ReportUrl location = this.m_report.Location;
             if (location != null)
             {
                 binaryWriter.Write((byte)10);
                 binaryWriter.Write(location.ToString());
             }
             if (reportLanguage != null)
             {
                 binaryWriter.Write((byte)11);
                 binaryWriter.Write(reportLanguage);
             }
             binaryWriter.Write((byte)255);
             this.m_pageOffset = baseStream.Position;
             binaryWriter.Write((byte)19);
             binaryWriter.Write((byte)3);
             binaryWriter.Write((byte)16);
             binaryWriter.Write((float)this.m_pageSettings.PhysicalPageHeight);
             binaryWriter.Write((byte)17);
             binaryWriter.Write((float)this.m_pageSettings.PhysicalPageWidth);
             binaryWriter.Write((byte)20);
             binaryWriter.Write((float)this.m_pageSettings.MarginBottom);
             binaryWriter.Write((byte)19);
             binaryWriter.Write((float)this.m_pageSettings.MarginLeft);
             binaryWriter.Write((byte)21);
             binaryWriter.Write((float)this.m_pageSettings.MarginRight);
             binaryWriter.Write((byte)18);
             binaryWriter.Write((float)this.m_pageSettings.MarginTop);
             ReportSectionPage reportSectionPage = new ReportSectionPage(((ReportElementCollectionBase <AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection>) this.m_report.ReportSections)[0].Page);
             reportSectionPage.WriteItemStyle(rplWriter, this.m_pageContext);
             binaryWriter.Write((byte)255);
         }
         else
         {
             RPLReport rPLReport = new RPLReport();
             rPLReport.ReportName        = this.m_report.Name;
             rPLReport.Description       = this.m_report.Description;
             rPLReport.Author            = this.m_report.Author;
             rPLReport.AutoRefresh       = this.m_report.AutoRefresh;
             rPLReport.ExecutionTime     = this.m_report.ExecutionTime;
             rPLReport.Location          = this.m_report.Location.ToString();
             rPLReport.Language          = reportLanguage;
             rPLReport.RPLVersion        = this.m_rplVersion;
             rPLReport.RPLPaginatedPages = new RPLPageContent[1];
             rplWriter.Report            = rPLReport;
         }
     }
 }