private BandBase BandAt(float y) { BandCollection bands = GetBands(); foreach (BandBase b in bands) { if (y >= b.Top && y <= b.Bottom + (ReportWorkspace.ClassicView ? BandBase.HeaderSize : 4)) { return(b); } } return(null); }
private void AddDataBandNode(TreeNodeCollection nodes, BandCollection bands) { foreach (var band in bands) { if (band is DataBand) { BuildDataBandTree(nodes, (DataBand)band); } else if (band is GroupHeaderBand) { BuildGroupBandTree(nodes, (GroupHeaderBand)band); } } }
private BandCollection GetBands() { BandCollection bands = new BandCollection(); ObjectCollection objects = PageDesigner.Page.AllObjects; foreach (Base c in objects) { if (c is BandBase) { bands.Add(c as BandBase); } } return(bands); }
private void RunBands(BandCollection bands) { for (int i = 0; i < bands.Count; i++) { BandBase band = bands[i]; if (band is DataBand) { RunDataBand(band as DataBand); } else if (band is GroupHeaderBand) { RunGroup(band as GroupHeaderBand); } if (Report.Aborted) { break; } } }
protected override void OnPaint(PaintEventArgs e) { if (Workspace.Locked) { return; } Graphics g = e.Graphics; float scale = ReportWorkspace.Scale; BandCollection bands = GetBands(); foreach (BandBase b in bands) { g.FillRectangle(SystemBrushes.Window, new RectangleF(5, Offset + b.Top * scale, Width - 10, b.Height * scale + 1)); DrawRuler(g, b.Top * scale, b.Height * scale); DrawGuides(g, b); if (ReportWorkspace.ClassicView) { RectangleF fillRect = new RectangleF(5, Offset + (b.Top - (BandBase.HeaderSize - 1)) * scale, Width - 10, (BandBase.HeaderSize - 1) * scale); if (b.Top == BandBase.HeaderSize) { fillRect.Y = 0; fillRect.Height += scale; } b.DrawBandHeader(g, fillRect, true); if (b.Top > BandBase.HeaderSize) { // draw splitter lines float lineY = fillRect.Top + fillRect.Height / 2 - 2; for (int i = 0; i < 6; i += 2) { g.DrawLine(SystemPens.ControlDarkDark, 9, lineY + i, Width - 10, lineY + i); } } } } }
//Hàm này không sài nữa private List<XtraReport> GetSubReport(BandCollection ListBand) { List<XtraReport> subreport = new List<XtraReport>(); foreach (Band band in ListBand) { foreach (XRControl xrControl in band.Controls) { if (xrControl is XRSubreport) { subreport.Add(((XRSubreport)xrControl).ReportSource); } } } return subreport; }
//public _ConfigPrinter ThietDatIn //{ // get // { // return this.thietDatIn; // } // set // { // this.thietDatIn = value; // } //} //Hàm này không sài nữa private BandCollection getBands(XtraReport xtraReport) { BandCollection collection = new BandCollection(new XtraReport()); foreach (Band band in xtraReport.Bands) { if ((band.Name != "PageHeader") && (band.Name != "PageFooter")) { collection.Add(band); } } return collection; }
public Group() { GroupFooter = new BandCollection(); GroupHeader = new BandCollection(); }
public Group(string name) { GroupFooter = new BandCollection(); GroupHeader = new BandCollection(); Name = name; }