The main report band used to display recurrent data records from a report’s data source. This band cannot be deleted from a report.
public class DetailBand : Band, IDrillDownNode, IDetailBand
Public Class DetailBand Inherits Band Implements IDrillDownNode, IDetailBand
By default, when a report is bound to a data source and the detail band contains data-bound controls, this band is printed as many times as there are records in the data source.
When the XtraReportBase.DataMember property is not specified or is specified incorrectly, the detail band will display the first data source record as many times as there are records in total.
To specify how many times the detail band should be printed with or without a data source assigned to the report, use the properties of the ReportPrintOptions class.
To specify whether or not a band’s content can be split across several pages, use its Band.KeepTogether property.
Although a report can only contain a single detail band, you can create any number of SubBand objects within a band.
See Introduction to Banded Reports for more details.
See Laying out Dynamic Report Contents to learn about the layout options available for this band.
The following example demonstrates how to add a control to the DetailBand instance, and then add this band to a report.
using System.Drawing; using DevExpress.XtraReports.UI; // ... // Create a report. XtraReport rep = new XtraReport(); // Create a DetailBand instance. DetailBand detail = new DetailBand(); // Create an XRLabel control. XRLabel label = new XRLabel(); // Set its background color. label.BackColor = Color.DarkGreen; // Add the label to the Detail band. detail.Controls.Add(label); // Add the Detail band to the report. rep.Bands.Add(detail); // Show the report's print preview. rep.ShowPreview();