public override void CreatePageHeader() { base.CreatePageHeader(); ICSharpCode.Reports.Core.BaseRowItem row = CreateRowWithTextColumns(base.ReportModel.PageHeader, this.reportItems); base.ReportModel.PageHeader.Items.Add(row); }
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; }
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); }
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))); }
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))); }
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); }
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); }
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); }
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); } }
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); }
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); }
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); }
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); }
private Point PrintDataRow (ReportPageEventArgs rpea,BaseRowItem row,int left,Point currentPos) { this.dataNavigator.Fill(row.Items); return this.PrintTextRow(rpea,row,left,currentPos); }
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; }
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; }
public RowRenderEventArgs (BaseRowItem row,object rowData) { Row = row; RowData = rowData; }