示例#1
0
 public override void CreatePageHeader()
 {
     base.CreatePageHeader();
     ICSharpCode.Reports.Core.BaseRowItem row = CreateRowWithTextColumns(base.ReportModel.PageHeader,
                                                                         this.reportItems);
     base.ReportModel.PageHeader.Items.Add(row);
 }
示例#2
0
		public ListLayout(ReportModel reportModel,ReportItemCollection reportItemCollection):base(reportModel)
		{
			this.reportItems = reportItemCollection;
			ICSharpCode.Reports.Core.BaseRowItem row = new ICSharpCode.Reports.Core.BaseRowItem();
			AdjustContainer(base.ReportModel.DetailSection,row);
			base.ParentItem = row;
		}
示例#3
0
 public ListLayout(ReportModel reportModel, ReportItemCollection reportItemCollection) : base(reportModel)
 {
     this.reportItems = reportItemCollection;
     ICSharpCode.Reports.Core.BaseRowItem row = new ICSharpCode.Reports.Core.BaseRowItem();
     AdjustContainer(base.ReportModel.DetailSection, row);
     base.SetParent(row);
 }
示例#4
0
        public override void CreatePageHeader()
        {
            base.CreatePageHeader();
            ICSharpCode.Reports.Core.BaseRowItem row = CreateRowWithTextColumns(base.ReportModel.PageHeader);

            AdjustContainer(Container, row);
            base.ReportModel.PageHeader.Items.Add(row);
        }
        public void Row_Should_Contain_Dataitems()
        {
            ICSharpCode.Reports.Core.BaseSection s       = this.reportModel.DetailSection;
            ICSharpCode.Reports.Core.BaseRowItem dataRow = (ICSharpCode.Reports.Core.BaseRowItem)s.Items[0];
            var item = dataRow.Items[0];

            Assert.That(item, Is.InstanceOf(typeof(ICSharpCode.Reports.Core.BaseDataItem)));
        }
示例#6
0
        public void PageDetailShouldContainDataItems()
        {
            ICSharpCode.Reports.Core.BaseSection s       = this.reportModel.DetailSection;
            ICSharpCode.Reports.Core.BaseRowItem rowItem = (ICSharpCode.Reports.Core.BaseRowItem)s.Items[0];
            Assert.IsTrue(rowItem.Items.Count > 0);
            BaseReportItem item = rowItem.Items[0];

            Assert.That(item, Is.InstanceOf(typeof(ICSharpCode.Reports.Core.BaseDataItem)));
        }
示例#7
0
		public override void CreateDataSection(ICSharpCode.Reports.Core.BaseSection section)
		{
			if (section == null) {
				throw new ArgumentNullException("section");
			}
			System.Drawing.Printing.Margins margin = GlobalValues.ControlMargins;
			
			ICSharpCode.Reports.Core.BaseTableItem table = new ICSharpCode.Reports.Core.BaseTableItem();
			table.Name = "Table1";
			AdjustContainer(base.ReportModel.DetailSection,table);
			base.ReportModel.DetailSection.Items.Add(table);
			
			base.ParentItem = table;
			
			ICSharpCode.Reports.Core.BaseRowItem headerRow = CreateRowWithTextColumns(ParentItem,  this.reportItems);
			ParentItem.Items.Add (headerRow);                                                                 
			
			Point insertLocation =  new Point (margin.Left,headerRow.Location.Y + headerRow.Size.Height + margin.Bottom + margin.Top);
			
			
			if (base.ReportModel.ReportSettings.GroupColumnsCollection.Count > 0) {                 
				var groupHeader = base.CreateGroupHeader(insertLocation);
				ParentItem.Items.Add(groupHeader);
				insertLocation = new Point(margin.Left,insertLocation.Y + groupHeader.Size.Height + margin.Bottom + margin.Top);
			}
			
			//Insert details allways
			
			ICSharpCode.Reports.Core.BaseRowItem detailRow = new ICSharpCode.Reports.Core.BaseRowItem();
			AdjustContainer (ParentItem,detailRow);
			
			detailRow.Location = insertLocation;
			detailRow.Size =  new Size(detailRow.Size.Width,30);

			int defX = AbstractLayout.CalculateControlWidth(detailRow,reportItems);
			
			int startX =  margin.Left;
			
			foreach (ICSharpCode.Reports.Core.BaseReportItem ir in this.reportItems)
			{
				Point np = new Point(startX,margin.Top);
				startX += defX;
				ir.Location = np;
				ir.Parent = detailRow;
				detailRow.Items.Add(ir);
			}
			
			ParentItem.Items.Add (detailRow);
			ParentItem.Size = CalculateContainerSize(ParentItem);
			section.Size = new Size (section.Size.Width,ParentItem.Size.Height + margin.Top + margin.Bottom);
		}
示例#8
0
		public override void CreateDataSection(ICSharpCode.Reports.Core.BaseSection section)
		{
			if (section == null) {
				throw new ArgumentNullException("section");
			}
			System.Drawing.Printing.Margins margin = GlobalValues.ControlMargins;
			
			ICSharpCode.Reports.Core.BaseTableItem table = new ICSharpCode.Reports.Core.BaseTableItem();
			ICSharpCode.Reports.Core.BaseRowItem detailRow = new ICSharpCode.Reports.Core.BaseRowItem();
			
			table.Name = "Table1";
			base.Container = table;
			AdjustContainer(base.ReportModel.DetailSection,table);
			base.ReportModel.DetailSection.Items.Add(table);
			
			ICSharpCode.Reports.Core.BaseRowItem headerRow = CreateRowWithTextColumns(Container);
			Container.Items.Add (headerRow);
			
			Point insertLocation =  new Point (margin.Left,headerRow.Location.Y + headerRow.Size.Height + margin.Bottom + margin.Top);
			
			
			if (base.ReportModel.ReportSettings.GroupColumnsCollection.Count > 0) {
				
				//Groupheader
				var groupHeader = base.CreateGroupHeader(insertLocation);
				Container.Items.Add(groupHeader);
				insertLocation = new Point(margin.Left,insertLocation.Y + groupHeader.Size.Height + margin.Bottom + margin.Top);
				
				//Detail
				CreateDetail(detailRow,insertLocation);
				Container.Items.Add (detailRow);
				
				// GroupFooter
				var groupFooter = base.CreateFooter(new Point(margin.Left,130));
				Container.Items.Add(groupFooter);

			}
			else
			{
				CreateDetail(detailRow,insertLocation);
				Container.Items.Add (detailRow);
			}
			
			CalculateContainerSize();
			section.Size = new Size (section.Size.Width,Container.Size.Height + margin.Top + margin.Bottom);
		}
示例#9
0
        public override void CreateDataSection(ICSharpCode.Reports.Core.BaseSection section)
        {
            if (section == null)
            {
                throw new ArgumentNullException("section");
            }
            System.Drawing.Printing.Margins margin = GlobalValues.ControlMargins;

            ICSharpCode.Reports.Core.BaseTableItem table     = new ICSharpCode.Reports.Core.BaseTableItem();
            ICSharpCode.Reports.Core.BaseRowItem   detailRow = new ICSharpCode.Reports.Core.BaseRowItem();

            table.Name     = "Table1";
            base.Container = table;
            AdjustContainer(base.ReportModel.DetailSection, table);
            base.ReportModel.DetailSection.Items.Add(table);

            ICSharpCode.Reports.Core.BaseRowItem headerRow = CreateRowWithTextColumns(Container);
            Container.Items.Add(headerRow);

            Point insertLocation = new Point(margin.Left, headerRow.Location.Y + headerRow.Size.Height + margin.Bottom + margin.Top);


            if (base.ReportModel.ReportSettings.GroupColumnsCollection.Count > 0)
            {
                //Groupheader
                var groupHeader = base.CreateGroupHeader(insertLocation);
                Container.Items.Add(groupHeader);
                insertLocation = new Point(margin.Left, insertLocation.Y + groupHeader.Size.Height + margin.Bottom + margin.Top);

                //Detail
                CreateDetail(detailRow, insertLocation);
                Container.Items.Add(detailRow);

                // GroupFooter
                var groupFooter = base.CreateFooter(new Point(margin.Left, 130));
                Container.Items.Add(groupFooter);
            }
            else
            {
                CreateDetail(detailRow, insertLocation);
                Container.Items.Add(detailRow);
            }

            CalculateContainerSize();
            section.Size = new Size(section.Size.Width, Container.Size.Height + margin.Top + margin.Bottom);
        }
示例#10
0
        void CreateDetail(ICSharpCode.Reports.Core.BaseRowItem detailRow, Point insertLocation)
        {
            AdjustContainer(Container, detailRow);
            detailRow.Location = insertLocation;
            detailRow.Size     = new Size(detailRow.Size.Width, 30);
            int defX = AbstractLayout.CalculateControlWidth(detailRow, ReportItems);

            int startX = GlobalValues.ControlMargins.Left;

            foreach (ICSharpCode.Reports.Core.BaseReportItem ir in ReportItems)
            {
                Point np = new Point(startX, GlobalValues.ControlMargins.Top);
                startX     += defX;
                ir.Location = np;
                ir.Parent   = detailRow;
                detailRow.Items.Add(ir);
            }
        }
示例#11
0
        public override void CreateDataSection(ICSharpCode.Reports.Core.BaseSection section)
        {
            if (section == null)
            {
                throw new ArgumentNullException("section");
            }
            System.Drawing.Printing.Margins margin = GlobalValues.ControlMargins;

            ICSharpCode.Reports.Core.BaseTableItem table = new ICSharpCode.Reports.Core.BaseTableItem();
            table.Name = "Table1";

            AdjustContainer(base.ReportModel.DetailSection, table);

            ICSharpCode.Reports.Core.BaseRowItem r1 = CreateRowWithTextColumns(table,
                                                                               this.reportItems);


            ICSharpCode.Reports.Core.BaseRowItem r2 = new ICSharpCode.Reports.Core.BaseRowItem();

            AdjustContainer(table, r2);

            r2.Location = new Point(margin.Left,
                                    r1.Location.Y + r1.Size.Height + margin.Bottom + margin.Top);

            int defX = r2.Size.Width / this.reportItems.Count;

            int startX = r2.Location.X + margin.Left;

            foreach (ICSharpCode.Reports.Core.BaseReportItem ir in this.reportItems)
            {
                Point np = new Point(startX, margin.Top);
                startX     += defX;
                ir.Location = np;
                ir.Parent   = r2;
                r2.Items.Add(ir);
            }

            table.Size = new Size(table.Size.Width,
                                  margin.Top + r1.Size.Height + margin.Bottom + r2.Size.Height + margin.Bottom);
            section.Size = new Size(section.Size.Width, table.Size.Height + margin.Top + margin.Bottom);
            table.Items.Add(r1);
            table.Items.Add(r2);
            base.ReportModel.DetailSection.Items.Add(table);
        }
示例#12
0
		public override void CreateDataSection(ICSharpCode.Reports.Core.BaseSection section)
		{
			if (section == null) {
				throw new ArgumentNullException("section");
			}
			System.Drawing.Printing.Margins margin = GlobalValues.ControlMargins;
			
			ICSharpCode.Reports.Core.BaseTableItem table = new ICSharpCode.Reports.Core.BaseTableItem();
			table.Name = "Table1";
			
			AdjustContainer(base.ReportModel.DetailSection,table);
			
			ICSharpCode.Reports.Core.BaseRowItem r1 = CreateRowWithTextColumns(table,
			                                                                   this.reportItems);
			
			
			ICSharpCode.Reports.Core.BaseRowItem r2 = new ICSharpCode.Reports.Core.BaseRowItem();
			
			AdjustContainer (table,r2);
						
			r2.Location = new Point (margin.Left,
			                         r1.Location.Y + r1.Size.Height + margin.Bottom + margin.Top);

			int defX = r2.Size.Width / this.reportItems.Count;
			
			int startX = r2.Location.X + margin.Left;
			
			foreach (ICSharpCode.Reports.Core.BaseReportItem ir in this.reportItems)
			{
				Point np = new Point(startX,margin.Top);
				startX += defX;
				ir.Location = np;
				ir.Parent = r2;
				r2.Items.Add(ir);
			}
			
			table.Size = new Size (table.Size.Width,
			                       margin.Top + r1.Size.Height + margin.Bottom + r2.Size.Height + margin.Bottom);
			section.Size = new Size (section.Size.Width,table.Size.Height + margin.Top + margin.Bottom);
			table.Items.Add (r1);
			table.Items.Add (r2);
			base.ReportModel.DetailSection.Items.Add(table);
		}
示例#13
0
        protected static ICSharpCode.Reports.Core.BaseRowItem CreateRowWithTextColumns(BaseReportItem parent, ReportItemCollection items)
        {
            ReportItemCollection colDetail = AbstractLayout.HeaderColumnsFromReportItems(items);

            ICSharpCode.Reports.Core.BaseRowItem row = new ICSharpCode.Reports.Core.BaseRowItem();
            AdjustContainer(parent, row);

            int defY   = parent.Location.Y + GlobalValues.ControlMargins.Top;
            int defX   = row.Size.Width / colDetail.Count;
            int startX = parent.Location.X + GlobalValues.ControlMargins.Left;

            foreach (ICSharpCode.Reports.Core.BaseTextItem ir in colDetail)
            {
                Point np = new Point(startX, defY);
                startX     += defX;
                ir.Location = np;
                ir.Parent   = row;
                row.Items.Add(ir);
            }
            return(row);
        }
示例#14
0
        protected ICSharpCode.Reports.Core.BaseRowItem CreateRowWithTextColumns(ISimpleContainer parent)
        {
            ReportItemCollection colDetail = AbstractLayout.HeaderColumnsFromReportItems(ReportItems);

            ICSharpCode.Reports.Core.BaseRowItem row = new ICSharpCode.Reports.Core.BaseRowItem();
            AdjustContainer(parent, row);

            int defY      = GlobalValues.ControlMargins.Top;
            int ctrlWidth = CalculateControlWidth(row, colDetail);
            int startX    = parent.Location.X + GlobalValues.ControlMargins.Left;

            foreach (ICSharpCode.Reports.Core.BaseTextItem ir in colDetail)
            {
                Point np = new Point(startX, defY);
                startX     += ctrlWidth;
                ir.Location = np;
                ir.Parent   = row;
                row.Items.Add(ir);
            }
            return(row);
        }
示例#15
0
		private Point PrintDataRow (ReportPageEventArgs rpea,BaseRowItem row,int left,Point currentPos)
		{
			this.dataNavigator.Fill(row.Items);
			return this.PrintTextRow(rpea,row,left,currentPos);
		}
示例#16
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;
		}
示例#17
0
		protected static ICSharpCode.Reports.Core.BaseRowItem CreateRowWithTextColumns(ISimpleContainer parent,ReportItemCollection items)
		{
			ReportItemCollection colDetail = AbstractLayout.HeaderColumnsFromReportItems(items);
			
			ICSharpCode.Reports.Core.BaseRowItem row = new ICSharpCode.Reports.Core.BaseRowItem();
			AdjustContainer(parent,row);

			int defY =  GlobalValues.ControlMargins.Top;
			int ctrlWidth = CalculateControlWidth(row,colDetail);
			int startX = parent.Location.X + GlobalValues.ControlMargins.Left;
			
			foreach (ICSharpCode.Reports.Core.BaseTextItem ir in colDetail) {
				Point np = new Point(startX,defY);
				startX += ctrlWidth;
				ir.Location = np;
				ir.Parent = row;
				row.Items.Add(ir);
			}
			return row;
		}
 public RowRenderEventArgs(BaseRowItem row, object rowData)
 {
     Row     = row;
     RowData = rowData;
 }
示例#19
0
		public RowRenderEventArgs (BaseRowItem row,object rowData)
		{
			Row = row;	
			RowData = rowData;
		}