예제 #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);
        }
예제 #7
0
		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;
 }
예제 #10
0
 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);
		}
예제 #12
0
 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);
        }
예제 #22
0
        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);
		}