Gets or sets the field name.

Namespace:  C1.C1Report
Assembly:  C1.C1Report.2 (in C1.C1Report.2.dll)

Syntax

C#
[DefaultValueAttribute(null)]
[MergablePropertyAttribute(false)]
[ParenthesizePropertyNameAttribute(true)]
public string Name { get; set; }
Visual Basic
<DefaultValueAttribute(Nothing)> _
<MergablePropertyAttribute(False)> _
<ParenthesizePropertyNameAttribute(True)> _
Public Property Name As String
	Get
	Set

Remarks

The field name can be used as an index into the control's Fields collection.

Field names are also used to identify fields in VBScript expressions, as shown in the example below.

Duplicate and empty field names are allowed, but should be avoided if you plan to use the field names in scripts or as indexers.

Examples

The code below assigns a script to the report's Detail section. The script changes a field's ForeColor property depending on a value.
Copy CodeC#
_c1r.Sections.Fields["sampleField"].ForeColor = Color.Black;
_c1r.Sections.Detail.OnFormat = 
    "sampleField.ForeColor = iif(someValue < 5, vbRed, vbBlack)";

See Also