XtraReport.DisplayName Property
Gets or sets the report’s display name. If the name is not empty, it serves as the default name of the exported document and appears in the End-User Designer‘s report tab. Otherwise, the value of the report’s Name property is used as a display name.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v20.2.dll
NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Reporting.Core
Declaration
[DefaultValue("")]
[SRCategory(ReportStringId.CatDesign)]
[XRLocalizable(true)]
public string DisplayName { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | The report’s display name. |
Remarks
The image below shows how the DisplayName property appears in the End-User Designer.
Example
The code sample below creates a new report, sets its name, display name, paper kind and margins, and adds the Detail Band band with the XRLabel control on it.
using System.Drawing;
using System.Drawing.Printing;
using DevExpress.XtraReports.UI;
// ...
public static XtraReport CreateReport() {
XtraReport report = new XtraReport() {
Name = "SimpleStaticReport",
DisplayName = "Simple Static Report",
PaperKind = PaperKind.Letter,
Margins = new Margins(100, 100, 100, 100)
};
DetailBand detailBand = new DetailBand() {
HeightF = 25
};
report.Bands.Add(detailBand);
XRLabel helloWordLabel = new XRLabel() {
Text = "Hello, World!",
Font = new Font("Tahoma", 20f, FontStyle.Bold),
BoundsF = new RectangleF(0, 0, 250, 50),
};
detailBand.Controls.Add(helloWordLabel);
return report;
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DisplayName 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.