protected virtual Point RenderSection(ReportPageEventArgs rpea) { Point currentPosition = Point.Empty; this.CurrentSection.Render(rpea); Evaluator.SinglePage = this.reportDocument.SinglePage; if (this.CurrentSection.Items.Count > 0) { Rectangle desiredRectangle = Layout.Layout(rpea.PrintPageEventArgs.Graphics, this.CurrentSection); Rectangle sectionRectangle = new Rectangle(this.CurrentSection.Location.X, this.CurrentSection.Location.Y, this.CurrentSection.Size.Width, this.CurrentSection.Size.Height); if (desiredRectangle.Height >= sectionRectangle.Height) { this.CurrentSection.Size = new Size(this.CurrentSection.Size.Width, desiredRectangle.Height + 10); } if (this.CurrentSection.DrawBorder) { StandardPrinter.DrawBorder(rpea.PrintPageEventArgs.Graphics, this.CurrentSection.BaseStyleDecorator); } // PrintHelper.DebugRectangle(rpea.PrintPageEventArgs.Graphics,Pens.Blue,new Rectangle(CurrentSection.Location,CurrentSection.Size)); } Rectangle r = StandardPrinter.RenderPlainCollection(this.CurrentSection, this.CurrentSection.Items, Evaluator, new Point(this.CurrentSection.Location.X, this.CurrentSection.SectionOffset), rpea); return(PrintHelper.ConvertRectangleToCurentPosition(r)); }