Esempio n. 1
0
 public RPLSizes(RPLSizes sizes)
 {
     m_top    = sizes.Top;
     m_left   = sizes.Left;
     m_height = sizes.Height;
     m_width  = sizes.Width;
 }
Esempio n. 2
0
        private void WriteEndItemToRPLOM(RPLWriter rplWriter, int sectionStartIndex, string pageName)
        {
            RPLPageContent rPLPageContent = rplWriter.Report.RPLPaginatedPages[0];

            rPLPageContent.PageLayout.PageName = pageName;
            RPLSizes[] array = new RPLSizes[this.m_sectionSizes.Count];
            for (int i = 0; i < this.m_sectionSizes.Count; i++)
            {
                array[i] = new RPLSizes((float)this.m_sectionSizes[i].Top, (float)this.m_sectionSizes[i].Left, (float)this.m_sectionSizes[i].Height, (float)this.m_sectionSizes[i].Width);
            }
            rPLPageContent.ReportSectionSizes = array;
            for (int j = sectionStartIndex; j <= this.m_lastSectionIndex; j++)
            {
                rPLPageContent.AddReportSection(this.m_sections[j].RPLReportSection);
            }
        }
        internal RenderingReport(GdiContext context)
        {
            RPLPageContent rPLPageContent = context.RplReport.RPLPaginatedPages[0];
            RPLPageLayout  pageLayout     = rPLPageContent.PageLayout;

            context.RenderingReport = this;
            float maxSectionWidth = rPLPageContent.MaxSectionWidth;

            m_position.X      = float.MaxValue;
            m_position.Y      = 0f;
            m_position.Width  = maxSectionWidth;
            m_position.Height = 0f;
            m_reportSections  = new List <RenderingReportSection>(rPLPageContent.ReportSectionSizes.Length);
            int num = 0;

            while (rPLPageContent.HasNextReportSection())
            {
                RPLReportSection nextReportSection = rPLPageContent.GetNextReportSection();
                RPLSizes         rPLSizes          = rPLPageContent.ReportSectionSizes[num];
                m_reportSections.Add(new RenderingReportSection(context, nextReportSection, rPLSizes, num, maxSectionWidth, m_position.Height));
                m_position.X       = Math.Min(m_position.X, rPLSizes.Left);
                m_position.Height += rPLSizes.Height;
                num++;
            }
            object obj = pageLayout.Style[34];

            if (obj != null)
            {
                BackgroundColor = new RPLReportColor((string)obj).ToColor();
            }
            object obj2 = pageLayout.Style[33];

            if (obj2 != null)
            {
                BackgroundImage = RenderingItem.GetImage(context, (RPLImageData)obj2);
                object obj3 = pageLayout.Style[35];
                if (obj3 == null)
                {
                    BackgroundRepeat = RPLFormat.BackgroundRepeatTypes.Repeat;
                }
                else
                {
                    BackgroundRepeat = (RPLFormat.BackgroundRepeatTypes)obj3;
                }
            }
            ProcessBorders(context.GdiWriter, pageLayout.Style, m_position, m_position, 0);
        }
Esempio n. 4
0
        internal RenderingReportSection(GdiContext context, RPLReportSection reportSection, RPLSizes sectionSize, int index, float width, float offsetTop)
        {
            m_position.Y      = offsetTop;
            m_position.X      = sectionSize.Left;
            m_position.Width  = width;
            m_position.Height = sectionSize.Height;
            string str = index.ToString(CultureInfo.InvariantCulture);

            m_accessibleName = "ReportSection" + str;
            RectangleF empty = RectangleF.Empty;

            if (reportSection.Header != null)
            {
                empty = new RectangleF(reportSection.Header.Left, reportSection.Header.Top + offsetTop, width, reportSection.Header.Height);
                reportSection.Header.Width = width;
                reportSection.Header.Element.ElementProps.UniqueName = "ReportSection" + str + "Header";
                m_header = new RenderingHeader();
                m_header.Initialize(context, reportSection.Header, empty, ReportPreviewStrings.ReportItemAccessibleNameHeader);
                m_header.SetWidth(width);
                offsetTop += reportSection.Header.Height;
            }
            RPLItemMeasurement rPLItemMeasurement = reportSection.Columns[0];

            empty = new RectangleF(rPLItemMeasurement.Left, rPLItemMeasurement.Top + offsetTop, width, rPLItemMeasurement.Height);
            rPLItemMeasurement.Width = width;
            rPLItemMeasurement.Element.ElementProps.UniqueName = "ReportSection" + str + "Body";
            m_body = new RenderingBody();
            m_body.Initialize(context, rPLItemMeasurement, empty, ReportPreviewStrings.ReportItemAccessibleNameBody);
            m_body.SetWidth(width);
            offsetTop += rPLItemMeasurement.Height;
            if (reportSection.Footer != null)
            {
                empty = new RectangleF(reportSection.Footer.Left, reportSection.Footer.Top + offsetTop, width, reportSection.Footer.Height);
                reportSection.Footer.Width = width;
                reportSection.Footer.Element.ElementProps.UniqueName = "Section" + str + "Footer";
                m_footer = new RenderingFooter();
                m_footer.Initialize(context, reportSection.Footer, empty, ReportPreviewStrings.ReportItemAccessibleNameFooter);
                m_footer.SetWidth(width);
                offsetTop += reportSection.Footer.Height;
            }
        }