xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrcontrol-dd5d46a8.md
Gets or sets a name of the control.
Namespace : DevExpress.XtraReports.UI
Assembly : DevExpress.XtraReports.v25.2.dll
NuGet Package : DevExpress.Reporting.Core
[Browsable(false)]
[DefaultValue("")]
public string Name { get; set; }
<DefaultValue("")>
<Browsable(False)>
Public Property Name As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String that is the control’s name. It should start with a letter or underscore (_).
|
The Name property identifies a control in the collection. You can use the parent control’s FindControl method to find a control by its name in the collection of child controls.
The name of a report control should be a valid C# identifier and meet the following requirements:
When you use the Report Designer to add a control, the name is generated automatically. You do not have to specify a name at runtime if you do not intend to use it in your code.
The Report Designer validates the name entered in the Properties window and displays an error message if validation fails. Incorrect names are replaced with automatically generated values at runtime.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Name property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
reporting-web-forms-handle-server-side-errors/CS/DXWebApplication1/Reports/XtraReport3.cs#L46
//
this.TopMargin.Name = "TopMargin";
//
reporting-winforms-create-report-dynamically-and-bind-it-to-dataset/CS/Form1.cs#L204
chart.Location = new Point(0, 0);
chart.Name = "xrChart1";
reporting-winforms-provide-authentication-to-access-json-data/CS/Form1.cs#L107
i++;
jsonDS.ConnectionName = string.Format("newJsonConnection_{0}{1}", report.Name, i.ToString());
reporting-winforms-export-report-to-xlsx-format/CS/Form1.cs#L38
@"\Downloads\" +
report.Name +
".xlsx";
reporting-conversion-vsrepx-tool/CS/HelperProject/ConverterComponent.cs#L67
ConversionResult res = converter.Convert(file);
res.TargetReport.Name = targetReport.Name;
return res;
reporting-web-forms-handle-server-side-errors/VB/DXWebApplication1/Reports/XtraReport3.vb#L45
'
Me.TopMargin.Name = "TopMargin"
'
Detail.Controls.AddRange(New XRControl() {lbText})
Detail.Name = "Detail"
Detail.Padding = New DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F)
reporting-winforms-create-report-dynamically-and-bind-it-to-dataset/VB/Form1.vb#L200
chart.Location = New Point(0, 0)
chart.Name = "xrChart1"
reporting-winforms-provide-authentication-to-access-json-data/VB/Form1.vb#L107
i += 1
jsonDS.ConnectionName = String.Format("newJsonConnection_{0}{1}", report.Name, i.ToString())
reporting-winforms-export-report-to-xlsx-format/VB/Form1.vb#L21
' Specify the path for the exported XLSX file.
Dim xlsxExportFileName As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) & "\Downloads\" & report.Name & ".xlsx"
' Export the report.
See Also