Exemplo n.º 1
0
		private ExporterCollection ConvertInternal(ExporterCollection mylist)
		{
			Point currentPosition = new Point(base.SectionBounds.DetailStart.X,base.SectionBounds.DetailStart.Y);
			Point dataAreaStart = new Point(baseTable.Items[0].Location.X,baseTable.Items[0].Location.Y + currentPosition.Y);
			ISimpleContainer headerContainer = null;
			
			int defaultLeftPos = PrintHelper.DrawingAreaRelativeToParent(this.baseTable.Parent,this.baseTable).Left;
			
			this.baseTable.Items.SortByLocation();
			
			foreach (ISimpleContainer simpleContainer in this.baseTable.Items)
			{
				if (simpleContainer.Items.Count > 0) {
					simpleContainer.Location = new Point (simpleContainer.Location.X + defaultLeftPos,simpleContainer.Location.Y);
					simpleContainer.Parent = (BaseReportItem)this.baseTable;
					base.SaveSize( new Size (simpleContainer.Size.Width,simpleContainer.Size.Height));
					// Header/FooterRow
				
					if (PrintHelper.IsTextOnlyRow(simpleContainer) ) {
						headerContainer = simpleContainer;
						currentPosition = base.BaseConvert(mylist,headerContainer,defaultLeftPos,currentPosition);
					}
					
					else 
					{
						// DataRegion
						base.SaveSize(simpleContainer.Size);
						do {
							//
							BaseSection section = this.baseTable.Parent as BaseSection;
							section.Location = new Point(section.Location.X,section.SectionOffset );
							base.FillAndLayoutRow(simpleContainer);
							
							if (PrintHelper.IsPageFull(new Rectangle(new Point (simpleContainer.Location.X,currentPosition.Y),simpleContainer.Size),base.SectionBounds)) {
								base.FirePageFull(mylist);
								mylist.Clear();

								currentPosition = base.BaseConvert(mylist,headerContainer,
								                                     defaultLeftPos,
								                                     base.SectionBounds.ReportHeaderRectangle.Location);
							}
							
							currentPosition = base.BaseConvert(mylist,simpleContainer,defaultLeftPos,currentPosition);
							simpleContainer.Size = base.RestoreSize;
						}
						while (base.DataNavigator.MoveNext());
						//Allway's reset the DataNavigator
						base.DataNavigator.Reset();
						base.DataNavigator.MoveNext();
						SectionBounds.ReportFooterRectangle =  new Rectangle(SectionBounds.ReportFooterRectangle.Left,
						                                                     currentPosition.Y,
						                                                     SectionBounds.ReportFooterRectangle.Width,
						                                                     SectionBounds.ReportFooterRectangle.Height);
					}
				}
			}
			return mylist;
		}
Exemplo n.º 2
0
        private ExporterCollection ConvertDataRow(ISimpleContainer simpleContainer)
        {
            ExporterCollection mylist   = new ExporterCollection();
            Point       currentPosition = new Point(base.SectionBounds.DetailStart.X, base.SectionBounds.DetailStart.Y);
            BaseSection section         = parent as BaseSection;

            int defaultLeftPos = parent.Location.X;

            do
            {
                section.Location = new Point(section.Location.X, section.SectionOffset);
                section.Size     = this.SectionBounds.DetailSectionRectangle.Size;
                base.SaveSize(section.Items[0].Size);

                base.FillAndLayoutRow(simpleContainer);
                base.FireSectionRendering(section);
                currentPosition = base.BaseConvert(mylist, simpleContainer, defaultLeftPos, currentPosition);

                section.Items[0].Size  = base.RestoreSize;
                section.SectionOffset += section.Size.Height + 2 * base.SinglePage.SectionBounds.Gap;


                if (PrintHelper.IsPageFull(new Rectangle(new Point(simpleContainer.Location.X, currentPosition.Y), section.Size), base.SectionBounds))
                {
                    base.FirePageFull(mylist);
                    section.SectionOffset = base.SinglePage.SectionBounds.PageHeaderRectangle.Location.Y;
                    currentPosition       = new Point(base.SectionBounds.PageHeaderRectangle.X, base.SectionBounds.PageHeaderRectangle.Y);
                    mylist.Clear();
                }

                if (section.DrawBorder == true)
                {
                    BaseRectangleItem br  = BasePager.CreateDebugItem(section);
                    BaseExportColumn  bec = br.CreateExportColumn();
                    bec.StyleDecorator.Location = section.Location;
                    mylist.Insert(0, bec);
                }
            }while (base.DataNavigator.MoveNext());

            SectionBounds.ReportFooterRectangle = new Rectangle(SectionBounds.ReportFooterRectangle.Left,
                                                                section.Location.Y + section.Size.Height,
                                                                SectionBounds.ReportFooterRectangle.Width,
                                                                SectionBounds.ReportFooterRectangle.Height);
            return(mylist);
        }
Exemplo n.º 3
0
		private ExporterCollection ConvertDataRow (ISimpleContainer simpleContainer)
		{
			ExporterCollection mylist = new ExporterCollection();
			Point currentPosition = new Point(base.SectionBounds.DetailStart.X,base.SectionBounds.DetailStart.Y);
			BaseSection section = parent as BaseSection;
			
			int defaultLeftPos = parent.Location.X;
			
			do {
				section.Location = new Point(section.Location.X,section.SectionOffset );
				section.Size = this.SectionBounds.DetailSectionRectangle.Size;
				base.SaveSize(section.Items[0].Size);
				
				base.FillAndLayoutRow(simpleContainer);
				base.FireSectionRendering(section);
				currentPosition = base.BaseConvert(mylist,simpleContainer,defaultLeftPos,currentPosition);
				
				section.Items[0].Size = base.RestoreSize;
				section.SectionOffset += section.Size.Height + 2 * base.SinglePage.SectionBounds.Gap;

				
				if (PrintHelper.IsPageFull(new Rectangle(new Point (simpleContainer.Location.X,currentPosition.Y), section.Size),base.SectionBounds)) {
					base.FirePageFull(mylist);
					section.SectionOffset = base.SinglePage.SectionBounds.PageHeaderRectangle.Location.Y;
					currentPosition = new Point(base.SectionBounds.PageHeaderRectangle.X,base.SectionBounds.PageHeaderRectangle.Y);
					mylist.Clear();
				}
				
				if (section.DrawBorder == true) {
					BaseRectangleItem br = BasePager.CreateDebugItem (section);
					BaseExportColumn bec = br.CreateExportColumn();
					bec.StyleDecorator.Location = section.Location;
					mylist.Insert(0,bec);
				}
			}
			while (base.DataNavigator.MoveNext());
			
			SectionBounds.ReportFooterRectangle =  new Rectangle(SectionBounds.ReportFooterRectangle.Left,
			                                                     section.Location.Y + section.Size.Height,
			                                                     SectionBounds.ReportFooterRectangle.Width,
			                                                     SectionBounds.ReportFooterRectangle.Height);
			return mylist;
		}
Exemplo n.º 4
0
        private ExporterCollection ConvertInternal(ExporterCollection mylist)
        {
            Point            currentPosition = new Point(base.SectionBounds.DetailStart.X, base.SectionBounds.DetailStart.Y);
            Point            dataAreaStart   = new Point(baseTable.Items[0].Location.X, baseTable.Items[0].Location.Y + currentPosition.Y);
            ISimpleContainer headerContainer = null;

            int defaultLeftPos = PrintHelper.DrawingAreaRelativeToParent(this.baseTable.Parent, this.baseTable).Left;

            this.baseTable.Items.SortByLocation();

            foreach (ISimpleContainer simpleContainer in this.baseTable.Items)
            {
                if (simpleContainer.Items.Count > 0)
                {
                    simpleContainer.Location = new Point(simpleContainer.Location.X + defaultLeftPos, simpleContainer.Location.Y);
                    simpleContainer.Parent   = (BaseReportItem)this.baseTable;
                    base.SaveSize(new Size(simpleContainer.Size.Width, simpleContainer.Size.Height));
                    // Header/FooterRow

                    if (PrintHelper.IsTextOnlyRow(simpleContainer))
                    {
                        headerContainer = simpleContainer;
                        currentPosition = base.BaseConvert(mylist, headerContainer, defaultLeftPos, currentPosition);
                    }

                    else
                    {
                        // DataRegion
                        base.SaveSize(simpleContainer.Size);
                        do
                        {
                            //
                            BaseSection section = this.baseTable.Parent as BaseSection;
                            section.Location = new Point(section.Location.X, section.SectionOffset);
                            base.FillAndLayoutRow(simpleContainer);

                            if (PrintHelper.IsPageFull(new Rectangle(new Point(simpleContainer.Location.X, currentPosition.Y), simpleContainer.Size), base.SectionBounds))
                            {
                                base.FirePageFull(mylist);
                                mylist.Clear();

                                currentPosition = base.BaseConvert(mylist, headerContainer,
                                                                   defaultLeftPos,
                                                                   base.SectionBounds.ReportHeaderRectangle.Location);
                            }

                            currentPosition      = base.BaseConvert(mylist, simpleContainer, defaultLeftPos, currentPosition);
                            simpleContainer.Size = base.RestoreSize;
                        }while (base.DataNavigator.MoveNext());
                        //Allway's reset the DataNavigator
                        base.DataNavigator.Reset();
                        base.DataNavigator.MoveNext();
                        SectionBounds.ReportFooterRectangle = new Rectangle(SectionBounds.ReportFooterRectangle.Left,
                                                                            currentPosition.Y,
                                                                            SectionBounds.ReportFooterRectangle.Width,
                                                                            SectionBounds.ReportFooterRectangle.Height);
                    }
                }
            }
            return(mylist);
        }
Exemplo n.º 5
0
		protected void BuildNewPage(ExporterCollection myList,BaseSection section)
		{			
			FirePageFull(myList);
			section.SectionOffset = SinglePage.SectionBounds.PageHeaderRectangle.Location.Y;		
			myList.Clear();
		}
Exemplo n.º 6
0
 protected void BuildNewPage(ExporterCollection myList, BaseSection section)
 {
     FirePageFull(myList);
     section.SectionOffset = SinglePage.SectionBounds.PageHeaderRectangle.Location.Y;
     myList.Clear();
 }