# C1.Report.FieldBase.Name

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_FieldBase_Name_" data-uid="C1.Report.FieldBase.Name*">Name Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_FieldBase_Name_" data-uid="C1.Report.FieldBase.Name*"></a>
<h4 id="C1_Report_FieldBase_Name" data-uid="C1.Report.FieldBase.Name">Name</h4>
<div class="markdown level1 summary"><p>Gets or sets the field name.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override string Name { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Property Name As String</code></pre>
</div>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="C1.Report.ReportObject.Name.html#C1_Report_ReportObject_Name">ReportObject.Name</a></div>
<h5 id="C1_Report_FieldBase_Name_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The field name can be used as an index into the control's <a class="xref" href="C1.Report.FlexReport.Fields.html#C1_Report_FlexReport_Fields">Fields</a> collection.</p>
<p>Field names are also used to identify fields in <b>VBScript</b> expressions, as shown in the example
below.</p>
<p>Duplicate and empty field names are allowed, but should be avoided if you plan to use the field names 
in scripts or as indexers.</p>
</div>
<h5 id="C1_Report_FieldBase_Name_examples">Examples</h5>
<p>The code below assigns a script to the report's <a class="xref" href="C1.Report.SectionTypeEnum.html#C1_Report_SectionTypeEnum_Detail">Detail</a> section. The script
changes a field's ForeColor property depending on a value.</p>
<pre><code class="lang-csharp">_c1r.Sections.Fields["sampleField"].ForeColor = Color.Black;
_c1r.Sections.Detail.OnFormat = 
    "sampleField.ForeColor = iif(someValue &lt; 5, vbRed, vbBlack)";</code></pre>

</div>
