예제 #1
0
        public RPLPageLayout WritePageLayout(RPLWriter rplWriter, PageContext pageContext)
        {
            RPLPageLayout     rPLPageLayout     = new RPLPageLayout();
            ReportSectionPage reportSectionPage = new ReportSectionPage(this.m_reportSection.Page);

            reportSectionPage.PageLayout = rPLPageLayout;
            rPLPageLayout.PageHeight     = (float)pageContext.Common.Pagination.PhysicalPageHeight;
            rPLPageLayout.PageWidth      = (float)pageContext.Common.Pagination.PhysicalPageWidth;
            rPLPageLayout.MarginBottom   = (float)pageContext.Common.Pagination.MarginBottom;
            rPLPageLayout.MarginLeft     = (float)pageContext.Common.Pagination.MarginLeft;
            rPLPageLayout.MarginRight    = (float)pageContext.Common.Pagination.MarginRight;
            rPLPageLayout.MarginTop      = (float)pageContext.Common.Pagination.MarginTop;
            reportSectionPage.WriteItemStyle(rplWriter, pageContext);
            return(rPLPageLayout);
        }
예제 #2
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;
         }
     }
 }