示例#1
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
            base.Render(rpea);
            Graphics g = rpea.PrintPageEventArgs.Graphics;

            if (this.Image == null)
            {
                this.Image = ErrorBitmap(new Size(base.DisplayRectangle.Width,
                                                  base.DisplayRectangle.Height));
            }

            if (this.scaleImageToSize)
            {
                g.DrawImageUnscaled(this.Image, this.Location.X, this.Location.Y);
                rpea.LocationAfterDraw = new Point(this.Location.X + this.Image.Width,
                                                   this.Location.Y + this.Image.Height);
            }
            else
            {
                RectangleF rect = base.DisplayRectangle;
                g.DrawImage(this.Image, rect);
                rpea.LocationAfterDraw = new Point(this.Location.X + (int)rect.Width,
                                                   this.Location.Y + (int)rect.Height);
            }
        }
示例#2
0
 public void RenderTable(BaseReportItem parent, SectionBounds sectionBounds, ReportPageEventArgs rpea, ILayouter layouter)
 {
     this.sectionBounds = sectionBounds;
     this.Parent        = parent;
     this.layouter      = layouter;
     this.Render(rpea);
 }
示例#3
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
            base.Render(rpea);
            Rectangle rectangle = base.DisplayRectangle;

            StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            BaseLine line = new BaseLine(base.ForeColor, base.DashStyle, base.Thickness, LineCap.Round, LineCap.Round, DashCap.Round);

            using (Pen pen = line.CreatePen(line.Thickness)){
                if (pen != null)
                {
                    shape.CornerRadius = this.CornerRadius;

                    GraphicsPath gfxPath = shape.CreatePath(rectangle);

                    rpea.PrintPageEventArgs.Graphics.FillPath(new SolidBrush(BackColor), gfxPath);;
                    rpea.PrintPageEventArgs.Graphics.DrawPath(pen, gfxPath);
                }
            }
        }
示例#4
0
        protected Point RenderItems(ReportPageEventArgs rpea)
        {
            base.SinglePage.IDataNavigator = this.dataNavigator;
            base.CurrentRow = this.dataNavigator.CurrentRow;
            ISimpleContainer container    = null;
            bool             hasContainer = false;

            foreach (BaseReportItem item in this.CurrentSection.Items)
            {
                container = item as ISimpleContainer;
                if (container != null)
                {
                    hasContainer = true;
                    break;
                }
            }
            if (hasContainer)
            {
                return(DoContainerControl(this.CurrentSection, container, rpea));
            }
            else
            {
                return(base.RenderSection(rpea));
            }
        }
 internal override void PrintReportFooter(object sender, ReportPageEventArgs rpea)
 {
     base.PrintReportFooter(sender, rpea);
     this.CurrentSection.SectionOffset = (int)rpea.LocationAfterDraw.Y;
     base.RenderSection(rpea);
     base.RemoveSectionEvents();
 }
示例#6
0
        public override void Render(ReportPageEventArgs rpea)
        {
            string toPrint = CheckForNullValue();

            base.Text = StandardFormatter.FormatOutput(toPrint, this.FormatString, base.DataType, this.NullValue);
            base.Render(rpea);
        }
		internal override void PrintReportHeader (object sender, ReportPageEventArgs rpea) 
		{
			base.PrintReportHeader (sender,rpea);
			if (base.CurrentSection.Items.Count > 0) {
				this.ReportHeader (rpea);
			}
			base.RemoveSectionEvents();
		}
示例#8
0
        private Point RenderSectionWithSimpleContainer(BaseSection section,
                                                       ISimpleContainer container,
                                                       Point offset,
                                                       ReportPageEventArgs rpea)

        {
            Point currentPosition = new Point(section.Location.X + container.Location.X, offset.Y);

//			if (section.VisibleInReport)
//			{

            //Always set section.size to it's original value

            section.Size = this.SectionBounds.DetailSectionRectangle.Size;

            Size containerSize = new Size(section.Items[0].Size.Width, section.Items[0].Size.Height);

            LayoutHelper.SetLayoutForRow(rpea.PrintPageEventArgs.Graphics, base.Layout, container);

            section.Render(rpea);

            PrintHelper.AdjustParent(section, section.Items);

            foreach (BaseReportItem item in section.Items)
            {
                ISimpleContainer con = item as ISimpleContainer;
                if (con != null)
                {
                    Rectangle r = StandardPrinter.RenderContainer(container, Evaluator, offset, rpea);
                    currentPosition = PrintHelper.ConvertRectangleToCurentPosition(r);
                }

                else
                {
                    item.SectionOffset = section.SectionOffset;
                    Point saveLocation = item.Location;
                    item.Render(rpea);

                    item.Location = saveLocation;

                    ISimpleContainer cont = item as ISimpleContainer;

                    Rectangle r = StandardPrinter.RenderContainer(cont, Evaluator, currentPosition, rpea);
                    currentPosition = PrintHelper.ConvertRectangleToCurentPosition(r);

                    item.Location = saveLocation;

                    rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X, section.SectionOffset + section.Size.Height);
                }

                section.Items[0].Size = containerSize;
                return(currentPosition);
            }

            return(currentPosition);
//			}
//			return currentPosition;
        }
示例#9
0
 public static void PageBreak(ReportPageEventArgs pea)
 {
     if (pea == null)
     {
         throw new ArgumentNullException("pea");
     }
     pea.PrintPageEventArgs.HasMorePages = true;
     pea.ForceNewPage = true;
 }
 internal override void PrintReportHeader(object sender, ReportPageEventArgs rpea)
 {
     base.PrintReportHeader(sender, rpea);
     if (base.CurrentSection.Items.Count > 0)
     {
         this.ReportHeader(rpea);
     }
     base.RemoveSectionEvents();
 }
示例#11
0
		public override void Render(ReportPageEventArgs rpea) 
		{
			string toPrint = CheckForNullValue();
			base.Text = StandardFormatter.FormatOutput(toPrint,
			                              this.FormatString,
			                              base.DataType,
			                              this.nullValue);
			base.Render (rpea);
		}
 internal override void BodyStart(object sender, ReportPageEventArgs rpea)
 {
     base.BodyStart(sender, rpea);
     if (this.dataNavigator.Count == 0)
     {
         this.ReportDocument.ReportHasData = false;
         PrintNoDataMessage(rpea.PrintPageEventArgs);
     }
     base.CurrentSection.SectionOffset = base.SectionBounds.DetailArea.Top + GlobalValues.GapBetweenContainer;
 }
示例#13
0
        protected virtual Point RenderSection(ReportPageEventArgs rpea)
        {
            Point drawPoint = Point.Empty;

            if (this.CurrentSection.Visible)
            {
                this.CurrentSection.Render(rpea);
                expressionFassade.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);
                    }

//					PrintHelper.DebugRectangle(rpea.PrintPageEventArgs.Graphics,Pens.Blue,new Rectangle(CurrentSection.Location,CurrentSection.Size));
                }

                foreach (BaseReportItem item in this.CurrentSection.Items)
                {
                    if (item.Parent == null)
                    {
                        item.Parent = this.CurrentSection;
                    }

                    item.SectionOffset = this.CurrentSection.SectionOffset;
                    BaseTextItem bti = item as BaseTextItem;

                    if (bti != null)
                    {
                        bti.Text = expressionFassade.Evaluate(bti.Text);
                    }
                    item.Render(rpea);
                    drawPoint = new Point(this.CurrentSection.Location.X,
                                          this.CurrentSection.SectionOffset + this.CurrentSection.Size.Height);
                    rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X,
                                                       this.CurrentSection.SectionOffset + this.CurrentSection.Size.Height);
                }

                if ((this.CurrentSection.CanGrow == false) && (this.CurrentSection.CanShrink == false))
                {
                    return(new Point(this.CurrentSection.Location.X,
                                     this.CurrentSection.Size.Height));
                }
                return(drawPoint);
            }
            return(drawPoint);
        }
示例#14
0
		public override void Render(ReportPageEventArgs rpea)
		{	
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			
			this.SetErrorLayout();
			Border b = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
			base.DrawFrame(rpea.PrintPageEventArgs.Graphics,b);
			Print (rpea,this.errMess,base.DrawingRectangle);
		}
		internal override void PrintDetail(object sender, ReportPageEventArgs rpea){
			base.PrintDetail(sender, rpea);
			this.CurrentSection.SectionOffset = base.SectionBounds.PageHeaderRectangle.Bottom;
			base.RenderSection(rpea);
			base.RemoveSectionEvents();
			base.ReportDocument.DetailsDone = true;
			
			// test for reportfooter
			if (!PrintHelper.IsRoomForFooter (base.SectionBounds,rpea.LocationAfterDraw)) {
				AbstractRenderer.PageBreak(rpea);
			}
		}
示例#16
0
		public override void Render(ReportPageEventArgs rpea)
		{
			this.NotifyPrinting();
			base.Render(rpea);
			
			if (this.DrawBorder == true) {
				Border b = new Border(new BaseLine (this.FrameColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
				Rectangle r = new Rectangle (this.Location,this.Size);
				b.DrawBorder(rpea.PrintPageEventArgs.Graphics,r);
			}
			this.NotifyPrinted();
		}
		public override void Render(ReportPageEventArgs rpea) {
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			base.Render(rpea);
			Rectangle rect = base.DrawingRectangle;
			
			base.FillBackground(rpea.PrintPageEventArgs.Graphics);
			shape.DrawShape (rpea.PrintPageEventArgs.Graphics,
			                 base.Baseline(),
			                 rect);
		}
示例#18
0
		public override void Render(ReportPageEventArgs rpea) {
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			base.Render(rpea);
			Rectangle rect = base.DisplayRectangle;
			
			StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics,this.BaseStyleDecorator);
			shape.DrawShape (rpea.PrintPageEventArgs.Graphics,
			                 base.Baseline(),
			                 rect);
		}
示例#19
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
//
            Point saveLocation    = this.Location;
            Point currentPosition = new Point(this.startSection.Location.X, this.startSection.Location.Y);
            Point tableStart      = currentPosition;

            base.Render(rpea);
            int defaultLeftPos = PrintHelper.DrawingAreaRelativeToParent(this.Parent, this).Left;

            this.Items.SortByLocation();
            rpea.SinglePage.StartRow = this.dataNavigator.CurrentRow;
            foreach (BaseRowItem row in this.items)
            {
                if (row != null)
                {
                    row.Parent = this;
                    if (PrintHelper.IsTextOnlyRow(row))
                    {
                        currentPosition = this.PrintTextRow(rpea, row, defaultLeftPos, currentPosition);
                        this.Location   = saveLocation;
                    }
                    else
                    {
                        do
                        {
                            if (PrintHelper.IsPageFull(new Rectangle(currentPosition, row.Size), sectionBounds))
                            {
                                this.Location = saveLocation;

                                rpea.SinglePage.EndRow = this.dataNavigator.CurrentRow;
                                AbstractRenderer.PageBreak(rpea);
                                return;
                            }
                            currentPosition = this.PrintDataRow(rpea, row, defaultLeftPos, currentPosition);
                        }while (this.dataNavigator.MoveNext());
                    }
                }
            }
            if (this.DrawBorder)
            {
                Border border = new Border(new BaseLine(this.ForeColor, System.Drawing.Drawing2D.DashStyle.Solid, 1));
                border.DrawBorder(rpea.PrintPageEventArgs.Graphics,
                                  new Rectangle(this.Parent.Location.X, tableStart.Y,
                                                this.Parent.Size.Width, currentPosition.Y + 5));
            }
            rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X, rpea.LocationAfterDraw.Y + 20);
            base.NotifyAfterPrint(rpea.LocationAfterDraw);
        }
示例#20
0
        public override void Render(ReportPageEventArgs rpea)
        {
            this.NotifyPrinting();
            base.Render(rpea);

            if (this.DrawBorder == true)
            {
                Border    b = new Border(new BaseLine(this.FrameColor, System.Drawing.Drawing2D.DashStyle.Solid, 1));
                Rectangle r = new Rectangle(this.Location, this.Size);
                b.DrawBorder(rpea.PrintPageEventArgs.Graphics, r);
            }
            this.NotifyPrinted();
        }
示例#21
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }

            this.SetErrorLayout();
            Border b = new Border(new BaseLine(this.ForeColor, System.Drawing.Drawing2D.DashStyle.Solid, 1));

            base.DrawFrame(rpea.PrintPageEventArgs.Graphics, b);
            Print(rpea, this.errMess, base.DisplayRectangle);
        }
        internal override void PrintDetail(object sender, ReportPageEventArgs rpea)
        {
            base.PrintDetail(sender, rpea);
            this.CurrentSection.SectionOffset = base.SectionBounds.PageHeaderRectangle.Bottom;
            base.RenderSection(rpea);
            base.RemoveSectionEvents();
            base.ReportDocument.DetailsDone = true;

            // test for reportfooter
            if (!PrintHelper.IsRoomForFooter(base.SectionBounds, rpea.LocationAfterDraw))
            {
                AbstractRenderer.PageBreak(rpea);
            }
        }
示例#23
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
            base.Render(rpea);
            Rectangle rect = base.DrawingRectangle;

            base.FillBackground(rpea.PrintPageEventArgs.Graphics);
            shape.DrawShape(rpea.PrintPageEventArgs.Graphics,
                            base.Baseline(),
                            rect);
        }
示例#24
0
        private Point PrintTextRow(ReportPageEventArgs rpea, BaseRowItem row, int left, Point currentPos)
        {
            Rectangle saveRec = new Rectangle(row.Location, row.Size);

            row.Location = new Point(left, currentPos.Y);
            EvaluateRecursive(this.expressionEvaluatorFacade, row.Items);
            PrintHelper.SetLayoutForRow(rpea.PrintPageEventArgs.Graphics, layouter, row);
            row.Render(rpea);

            Point retVal = new Point(left, currentPos.Y + row.Size.Height + 10);

            //reset values
            row.Size     = new Size(saveRec.Size.Width, saveRec.Size.Height);
            row.Location = saveRec.Location;
            return(retVal);
        }
示例#25
0
		public override void Render(ReportPageEventArgs rpea) 
		{
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			base.Render (rpea);
			Rectangle rect = base.DisplayRectangle;
			
			shape.FillShape(rpea.PrintPageEventArgs.Graphics,
			                new SolidFillPattern(this.BackColor),
			                rect);
			
			shape.DrawShape (rpea.PrintPageEventArgs.Graphics,
			                 base.Baseline(),
			                 rect);
		}
示例#26
0
		public override void Render(ReportPageEventArgs rpea)
		{
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
//
			Point saveLocation = this.Location;
			Point currentPosition = new Point(this.startSection.Location.X,this.startSection.Location.Y);
			Point tableStart = currentPosition;
			base.Render(rpea);
			int defaultLeftPos = PrintHelper.DrawingAreaRelativeToParent(this.Parent,this).Left;
			this.Items.SortByLocation();
			rpea.SinglePage.StartRow  = this.dataNavigator.CurrentRow;
			foreach (BaseRowItem row in this.items)
			{
				if (row != null)
				{
					row.Parent = this;
					if (PrintHelper.IsTextOnlyRow(row) )
					{
						currentPosition = this.PrintTextRow (rpea,row,defaultLeftPos,currentPosition);
						this.Location = saveLocation;
					}
					else {
						do {
							if (PrintHelper.IsPageFull(new Rectangle(currentPosition,row.Size),sectionBounds)) {
								this.Location = saveLocation;
							
								rpea.SinglePage.EndRow = this.dataNavigator.CurrentRow;
								AbstractRenderer.PageBreak(rpea);
								return;
							}
							currentPosition = this.PrintDataRow (rpea,row,defaultLeftPos,currentPosition);
						}
						while (this.dataNavigator.MoveNext());
					}
				}
			}
			if (this.DrawBorder) {
				Border border = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
				border.DrawBorder(rpea.PrintPageEventArgs.Graphics,
				                  new Rectangle(this.Parent.Location.X,tableStart.Y,
				                                this.Parent.Size.Width,currentPosition.Y + 5));
			}
			rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X,rpea.LocationAfterDraw.Y + 20);
			base.NotifyAfterPrint (rpea.LocationAfterDraw);
		}
示例#27
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
            base.Render(rpea);
            Rectangle rect = base.DisplayRectangle;

            shape.FillShape(rpea.PrintPageEventArgs.Graphics,
                            new SolidFillPattern(this.BackColor),
                            rect);

            shape.DrawShape(rpea.PrintPageEventArgs.Graphics,
                            base.Baseline(),
                            rect);
        }
示例#28
0
		public override void Render(ReportPageEventArgs rpea) {
			
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			
			base.Render(rpea);
			base.FillBackground(rpea.PrintPageEventArgs.Graphics);
			//Border b = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
			Border b = new Border(new BaseLine (this.FrameColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
			base.DrawFrame(rpea.PrintPageEventArgs.Graphics,b);
			
			string formated = StandardFormatter.FormatOutput(this.text,this.FormatString,this.DataType,String.Empty);
			
			Print (rpea,formated,base.DrawingRectangle);
			base.NotifyAfterPrint (rpea.LocationAfterDraw);
		}
示例#29
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
            Point point = this.Location;

            base.Render(rpea);

            if (this.BackColor != GlobalValues.DefaultBackColor)
            {
                base.FillBackground(rpea.PrintPageEventArgs.Graphics);
            }


            Border b = new Border(new BaseLine(this.FrameColor, System.Drawing.Drawing2D.DashStyle.Solid, 1));

            base.DrawFrame(rpea.PrintPageEventArgs.Graphics, b);

            this.Location = new Point(base.DrawingRectangle.Left, this.Location.Y);

            if ((this.items != null) && (this.items.Count > 0))
            {
                foreach (BaseReportItem childItem in this.items)
                {
                    childItem.Parent = this;

                    Point saveloc = new Point(childItem.Location.X, childItem.Location.Y);

                    childItem.Location = new Point(childItem.Location.X,
                                                   base.DrawingRectangle.Top + childItem.Location.Y);


                    if (this.BackColor != GlobalValues.DefaultBackColor)
                    {
                        childItem.BackColor = this.BackColor;
                    }
                    childItem.Render(rpea);
                    childItem.Location = saveloc;
                }
            }
            this.Location = point;
            base.NotifyAfterPrint(rpea.LocationAfterDraw);
        }
示例#30
0
		public override void Render(ReportPageEventArgs rpea) {
			
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			
			base.Render(rpea);
			
			StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics,this.BaseStyleDecorator);
			
			StandardPrinter.DrawBorder(rpea.PrintPageEventArgs.Graphics,this.BaseStyleDecorator);
			
			string formated = StandardFormatter.FormatOutput(this.text,this.FormatString,this.DataType,String.Empty);
		
			Print (rpea,formated,base.DisplayRectangle);
		
			base.NotifyAfterPrint (rpea.LocationAfterDraw);
		}
示例#31
0
        protected Point RenderItems(ReportPageEventArgs rpea)
        {
            base.SinglePage.IDataNavigator = this.dataNavigator;
            base.CurrentRow = this.dataNavigator.CurrentRow;

            ISimpleContainer container = PrintHelper.FindContainer(this.CurrentSection.Items);

            if (container != null)
            {
                return(RenderSectionWithSimpleContainer(this.CurrentSection, container,
                                                        new Point(CurrentSection.Location.X, CurrentSection.SectionOffset),
                                                        rpea));
            }
            else
            {
                return(base.RenderSection(rpea));
            }
        }
示例#32
0
        /// <summary>
        /// Standart Function to Draw Strings
        /// </summary>
        /// <param name="e">ReportpageEventArgs</param>
        /// <param name="toPrint">Formatted String toprint</param>
        /// <param name="rectangle">rectangle where to draw the string</param>

        protected void Print(ReportPageEventArgs rpea,
                             string toPrint,
                             RectangleF rectangle)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
            TextDrawer.DrawString(rpea.PrintPageEventArgs.Graphics,
                                  toPrint, this.Font,
                                  new SolidBrush(this.ForeColor),
                                  rectangle,
                                  this.stringTrimming, this.contentAlignment);


            rpea.LocationAfterDraw = new Point(this.Location.X + this.Size.Width,
                                               this.Location.Y + this.Size.Height);
        }
示例#33
0
 public override void Render(ReportPageEventArgs rpea)
 {
     if (rpea == null)
     {
         throw new ArgumentNullException("rpea");
     }
     base.Render(rpea);
     shape.DrawShape(rpea.PrintPageEventArgs.Graphics,
                     new BaseLine(this.ForeColor, base.DashStyle,
                                  base.Thickness,
                                  this.StartLineCap,
                                  this.EndLineCap,
                                  this.DashLineCap),
                     new Point(base.DisplayRectangle.Left + this.FromPoint.X,
                               this.FromPoint.Y + base.DisplayRectangle.Top),
                     new Point(base.DisplayRectangle.Left + this.ToPoint.X,
                               this.ToPoint.Y + base.DisplayRectangle.Top));
 }
示例#34
0
		public override void Render(ReportPageEventArgs rpea)
		{
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			base.Render (rpea);
			shape.DrawShape (rpea.PrintPageEventArgs.Graphics,
			                 new BaseLine (this.ForeColor,base.DashStyle,
			                               base.Thickness,
			                               this.startLineCap,
			                               this.endLineCap,
			                               this.dashLineCap),
			                 new Point(base.DisplayRectangle.Left + this.fromPoint.X,
			                           this.FromPoint.Y + base.DisplayRectangle.Top),
			                 new Point (base.DisplayRectangle.Left + this.ToPoint.X,
			                            this.ToPoint.Y + base.DisplayRectangle.Top));
			
		}
示例#35
0
		public override void Render(ReportPageEventArgs rpea)
		{
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			Point point = this.Location;
			base.Render(rpea);
			
			StandardPrinter.AdjustBackColor(this);
		
			StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics,this.BaseStyleDecorator);
			
			StandardPrinter.DrawBorder(rpea.PrintPageEventArgs.Graphics,this.BaseStyleDecorator);
			
			rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X,this.Location.Y + this.Size.Height);
			this.Location = point;
			base.NotifyAfterPrint (rpea.LocationAfterDraw);
		}
示例#36
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }

            base.Render(rpea);

            StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            StandardPrinter.DrawBorder(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            string formated = StandardFormatter.FormatOutput(this.text, this.FormatString, this.DataType, String.Empty);

            Print(rpea, formated, base.DisplayRectangle);

            base.NotifyAfterPrint(rpea.LocationAfterDraw);
        }
示例#37
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }

            base.Render(rpea);
            base.FillBackground(rpea.PrintPageEventArgs.Graphics);
            //Border b = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
            Border b = new Border(new BaseLine(this.FrameColor, System.Drawing.Drawing2D.DashStyle.Solid, 1));

            base.DrawFrame(rpea.PrintPageEventArgs.Graphics, b);

            string formated = StandardFormatter.FormatOutput(this.text, this.FormatString, this.DataType, String.Empty);

            Print(rpea, formated, base.DrawingRectangle);
            base.NotifyAfterPrint(rpea.LocationAfterDraw);
        }
示例#38
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
            Point point = this.Location;

            base.Render(rpea);

            StandardPrinter.AdjustBackColor(this);

            StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            StandardPrinter.DrawBorder(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X, this.Location.Y + this.Size.Height);
            this.Location          = point;
            base.NotifyAfterPrint(rpea.LocationAfterDraw);
        }
		protected Point RenderItems (ReportPageEventArgs rpea) 
		{
			base.SinglePage.IDataNavigator = this.dataNavigator;
			base.CurrentRow = this.dataNavigator.CurrentRow;
			ISimpleContainer container = null;
			bool hasContainer = false;
			foreach (BaseReportItem item in this.CurrentSection.Items) {
				container = item as ISimpleContainer;
				if (container != null) {
					hasContainer = true;
					break;
				}
			}
			if (hasContainer) {
				return DoContainerControl(this.CurrentSection,container,rpea);
				
			} else {
				return base.RenderSection(rpea);
			}
			
		}
示例#40
0
        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));
        }
示例#41
0
        private Point DoContainerControl(BaseSection section,
                                         ISimpleContainer container,
                                         ReportPageEventArgs rpea)
        {
            Point drawPoint = Point.Empty;

            if (section.Visible)
            {
                //Always set section.size to it's original value

                section.Size = this.SectionBounds.DetailSectionRectangle.Size;
                Size             containerSize = new Size(section.Items[0].Size.Width, section.Items[0].Size.Height);
                ISimpleContainer row           = (ISimpleContainer)section.Items[0];
                PrintHelper.SetLayoutForRow(rpea.PrintPageEventArgs.Graphics, base.Layout, row);
                section.Render(rpea);


                foreach (BaseReportItem item in section.Items)
                {
                    if (item.Parent == null)
                    {
                        item.Parent = section;
                    }
                    item.SectionOffset = section.SectionOffset;
                    item.Render(rpea);
                    drawPoint = new Point(item.Location.X,
                                          section.SectionOffset + section.Size.Height);
                    rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X, section.SectionOffset + section.Size.Height);
                }
                section.Items[0].Size = containerSize;
                if ((section.CanGrow == false) && (section.CanShrink == false))
                {
                    return(new Point(section.Location.X, section.Size.Height));
                }
                section.Items[0].Size = containerSize;
                return(drawPoint);
            }

            return(drawPoint);
        }
示例#42
0
		public override void Render(ReportPageEventArgs rpea)
		{
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			Point point = this.Location;
			base.Render(rpea);
			
			if (this.BackColor != GlobalValues.DefaultBackColor) {
				base.FillBackground(rpea.PrintPageEventArgs.Graphics);       
			}
			 
			
			Border b = new Border(new BaseLine (this.FrameColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
			
			base.DrawFrame (rpea.PrintPageEventArgs.Graphics,b);
			
			this.Location = new Point(base.DrawingRectangle.Left,this.Location.Y);
			
			if ((this.items != null) && (this.items.Count > 0)) {
				foreach (BaseReportItem childItem in this.items) {
					childItem.Parent = this;
					
					Point saveloc = new Point (childItem.Location.X,childItem.Location.Y);
					
					childItem.Location = new Point(childItem.Location.X,
					                               base.DrawingRectangle.Top + childItem.Location.Y);
					
					
					if (this.BackColor != GlobalValues.DefaultBackColor) {
							childItem.BackColor = this.BackColor;
					}
					childItem.Render (rpea);
					childItem.Location = saveloc;
				}
			}
			this.Location = point;
			base.NotifyAfterPrint (rpea.LocationAfterDraw);
		}
示例#43
0
		public override void Render(ReportPageEventArgs rpea) {
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			base.Render(rpea);
			Rectangle rectangle = base.DisplayRectangle;
			StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics,this.BaseStyleDecorator);
			
			BaseLine line = new BaseLine(base.ForeColor,base.DashStyle,base.Thickness,LineCap.Round,LineCap.Round,DashCap.Round);
			
			using (Pen pen = line.CreatePen(line.Thickness)){
				if (pen != null)
				{
					shape.CornerRadius = this.CornerRadius;

					GraphicsPath gfxPath = shape.CreatePath(rectangle);
					
					rpea.PrintPageEventArgs.Graphics.FillPath(new SolidBrush(BackColor), gfxPath);;
					rpea.PrintPageEventArgs.Graphics.DrawPath(pen, gfxPath);
				}
			}
		}
		private  Point DoContainerControl (BaseSection section,
		                                   ISimpleContainer container,
		                                   ReportPageEventArgs rpea)
		{
			Point drawPoint	= Point.Empty;
			if (section.Visible){
				
				//Always set section.size to it's original value
				
				section.Size = this.SectionBounds.DetailSectionRectangle.Size;
				Size containerSize = new Size (section.Items[0].Size.Width,section.Items[0].Size.Height);
				ISimpleContainer row =(ISimpleContainer) section.Items[0];
				PrintHelper.SetLayoutForRow(rpea.PrintPageEventArgs.Graphics,base.Layout,row);
				section.Render (rpea);
				
				
				foreach (BaseReportItem item in section.Items) {
					if (item.Parent == null) {
						item.Parent = section;
					}
					item.SectionOffset = section.SectionOffset;
					item.Render(rpea);
					drawPoint = new Point(item.Location.X,
					                      section.SectionOffset + section.Size.Height);
					rpea.LocationAfterDraw = new Point (rpea.LocationAfterDraw.X,section.SectionOffset + section.Size.Height);
					
				}
				section.Items[0].Size = containerSize;
				if ((section.CanGrow == false)&& (section.CanShrink == false)) {
					return new Point(section.Location.X,section.Size.Height);
				}
				section.Items[0].Size = containerSize;
				return drawPoint;
			}
			
			return drawPoint;
		}
		internal override void BodyEnd (object sender,ReportPageEventArgs rpea) {
			base.BodyEnd (sender,rpea);
			rpea.PrintPageEventArgs.HasMorePages = false;
		}
		/// <summary>
		/// Print the PageFooter 
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		
		internal override void PrintPageEnd(object sender, ReportPageEventArgs rpea) {
			base.PrintPageEnd(this,rpea);
			this.CurrentSection.SectionOffset = base.SectionBounds.PageFooterRectangle.Location.Y;
			base.RenderSection (rpea);
		}
		internal override void PrintReportFooter(object sender, ReportPageEventArgs rpea){
			base.PrintReportFooter(sender, rpea);
			this.CurrentSection.SectionOffset = (int)rpea.LocationAfterDraw.Y;
			base.RenderSection(rpea);
			base.RemoveSectionEvents();
		}
		/// <summary>
		/// Detail Section
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		internal override void BodyStart (object sender,ReportPageEventArgs rpea) {
			base.BodyStart (sender,rpea);
		}
		internal override void PrintReportHeader (object sender, ReportPageEventArgs rpea) {
			base.PrintReportHeader (sender,rpea);
			base.RenderSection (rpea);
		}
示例#50
0
		private Point PrintTextRow(ReportPageEventArgs rpea,BaseRowItem row,int left,Point currentPos	)
		{
			Rectangle saveRec = new Rectangle (row.Location,row.Size);
			row.Location = new Point (left,currentPos.Y);
			EvaluateRecursive (this.expressionEvaluatorFacade,row.Items);
			PrintHelper.SetLayoutForRow(rpea.PrintPageEventArgs.Graphics,layouter,row);
			row.Render (rpea);
			
			Point retVal = new Point (left,currentPos.Y + row.Size.Height +10);
			//reset values
			row.Size = new Size(saveRec.Size.Width,saveRec.Size.Height);
			row.Location = saveRec.Location;
			return retVal;
		}
示例#51
0
		private void PageFooter (ReportPageEventArgs rpea)
		{
			this.CurrentSection.SectionOffset = base.SectionBounds.PageFooterRectangle.Location.Y;
			base.RenderSection (rpea);
			base.RenderItems(rpea);
		}
示例#52
0
 internal virtual void  PrintReportFooter(object sender, ReportPageEventArgs rpea)
 {
     this.CurrentSection = this.reportModel.ReportFooter;
     this.AddSectionEvents();
 }
示例#53
0
 internal virtual void  BodyEnd(object sender, ReportPageEventArgs rpea)
 {
     this.CurrentSection = this.reportModel.ReportFooter;
 }
示例#54
0
 internal virtual void  PrintDetail(object sender, ReportPageEventArgs rpea)
 {
     this.CurrentSection = this.reportModel.DetailSection;
     this.AddSectionEvents();
 }
示例#55
0
		private void  ReportFooter (ReportPageEventArgs rpea)
		{
			this.CurrentSection.SectionOffset = (int)rpea.LocationAfterDraw.Y;
			base.RenderSection (rpea);
			base.RenderItems(rpea);
		}
示例#56
0
		internal override void PrintPageFooter(object sender, ReportPageEventArgs rpea) 
		{
			base.PrintPageFooter(sender,rpea);
			this.PageFooter (rpea);
			base.RemoveSectionEvents();
		}
示例#57
0
		public override void Render(ReportPageEventArgs rpea)
		{
			this.NotifyPrinting();
			base.Render(rpea);
			this.NotifyPrinted();
		}
示例#58
0
		/// <summary>
		/// Standart Function to Draw Strings
		/// </summary>
		/// <param name="e">ReportpageEventArgs</param>
		/// <param name="toPrint">Formatted String toprint</param>
		/// <param name="rectangle">rectangle where to draw the string</param>
	
		protected void Print (ReportPageEventArgs rpea,
		                              string toPrint,
		                              RectangleF rectangle ) {
			
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			
			TextDrawer.DrawString(rpea.PrintPageEventArgs.Graphics,
			                      toPrint,this.Font,
			                      new SolidBrush(this.ForeColor),
			                      rectangle,
			                      this.StringFormat);
			
			                      
			rpea.LocationAfterDraw = new Point (this.Location.X + this.Size.Width,
			                                    this.Location.Y + this.Size.Height);
		}
示例#59
0
		public void RenderTable (BaseReportItem parent,SectionBounds sectionBounds,ReportPageEventArgs rpea,ILayouter layouter)
		{
			
			this.sectionBounds = sectionBounds;
			this.Parent = parent;
			this.layouter = layouter;
			this.Render (rpea);
		}
示例#60
0
		private Point PrintDataRow (ReportPageEventArgs rpea,BaseRowItem row,int left,Point currentPos)
		{
			this.dataNavigator.Fill(row.Items);
			return this.PrintTextRow(rpea,row,left,currentPos);
		}