protected override void BuildReportFooter(Rectangle footerRectangle) { bool pageBreak = false; base.ReportModel.ReportFooter.SectionOffset = footerRectangle.Top + GlobalValues.GapBetweenContainer; SectionBounds.Offset = new Point(SectionBounds.Offset.X, footerRectangle.Top + GlobalValues.GapBetweenContainer); if (!PrintHelper.IsRoomForFooter(base.SectionBounds, base.ReportModel.ReportFooter.Location)) { PageBreak(); base.ReportModel.ReportFooter.SectionOffset = SectionBounds.DetailArea.Top; pageBreak = true; } ExporterCollection convertedList = new ExporterCollection(); var section = base.ReportModel.DetailSection; var table = section.Items[0] as BaseTableItem; if (table != null) { if (pageBreak) { // Print the HeaderRow var headerRow = table.Items[0]; var curPos = BaseConverter.ConvertContainer(convertedList, (ISimpleContainer)headerRow, SectionBounds.PageHeaderRectangle.Left, SectionBounds.PageHeaderRectangle.Location); base.SinglePage.Items.AddRange(convertedList); base.ReportModel.ReportFooter.SectionOffset = curPos.Y + GlobalValues.GapBetweenContainer; } } //allways print the reportFooter ConvertSectionInternal(base.ReportModel.ReportFooter); }
protected ExporterCollection ConvertSection(BaseSection section, int dataRow) { Point currentBottom = Point.Empty; bool isContainer = false; PrepareSection(section, dataRow); var convertedSection = new ExporterCollection(); Offset = SectionBounds.Offset; if (section.Items.Count > 0) { Rectangle desiredRectangle = LayoutHelper.CalculateSectionLayout(this.Graphics, section); LayoutHelper.FixSectionLayout(desiredRectangle, section); section.Items.SortByLocation(); GapList gapCalculator = new GapList(); gapCalculator.CalculateGapList(section); int i = 0; foreach (BaseReportItem item in section.Items) { ISimpleContainer simpleContainer = item as ISimpleContainer; if (simpleContainer != null) { isContainer = true; Offset = new Point(Offset.X, Offset.Y + gapCalculator.GapBetweenItems[i]); var containerSize = simpleContainer.Size; EvaluationHelper.EvaluateReportItems(EvaluatorFacade, simpleContainer.Items); var layouter = (ILayouter)ServiceContainer.GetService(typeof(ILayouter)); LayoutHelper.SetLayoutForRow(Graphics, layouter, simpleContainer); section.MeasureOverride(section.Size); Offset = BaseConverter.ConvertContainer(convertedSection, simpleContainer, Offset.X, Offset); simpleContainer.Size = containerSize; } else { IBaseExportColumn converteditem = null; if (isContainer) { item.Location = new Point(item.Location.X, Offset.Y + gapCalculator.GapBetweenItems[i]); converteditem = ExportHelper.ConvertLineItem(item, new Point(item.Location.X, gapCalculator.GapBetweenItems[i])); isContainer = false; } else { converteditem = ExportHelper.ConvertLineItem(item, Offset); } if (converteditem.StyleDecorator.DisplayRectangle.Bottom > currentBottom.Y) { currentBottom = new Point(converteditem.StyleDecorator.Location.X, converteditem.StyleDecorator.DisplayRectangle.Bottom); } convertedSection.Add((BaseExportColumn)converteditem); } i++; } Offset = new Point(Offset.X, Offset.Y + gapCalculator.LastGap); if (currentBottom.Y > Offset.Y) { Offset = new Point(Offset.X, currentBottom.Y); } } SectionBounds.Offset = Offset; return(convertedSection); }