ActiveReports 13
DataField Property (Barcode)

GrapeCity.ActiveReports Assembly > GrapeCity.ActiveReports.SectionReportModel Namespace > Barcode Class : DataField Property
Gets or sets the name of the field used to bind the data source records.
Public Overrides NotOverridable Property DataField As String
public override string DataField {get; set;}

Property Value

Name of the data bound field. Default is an empty string; the control is not bound.

When the DataField property is set to a field contained within the DataSource, ActiveReports binds the field's data from each record to the control. The recordset data is first saved into the Value property. It then converts to any output format and is set as the control's text.

The DataField property can also be used to perform calculations using a scripting expression beginning with an equals sign (=). This allows fields to be set up to display calculated results. For example, field control or data field's group field section can be set to an expression such as "=UnitPrice * Qty" or "=CompanyName.Trim()" where UnitPrice, Qty and CompanyName are members of the report's Fields collection.

Add an equals sign (=) at the beginning when using parameters in a DataField property.

When using XML, the DataField must be set to a valid XPath expression.


See Also


Barcode Class
Barcode Members