Ejemplo n.º 1
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;
        }
Ejemplo n.º 2
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);
        }
		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;
		}
Ejemplo n.º 4
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;
		}