Skip to main content
A newer version of this page is available. .

XtraReport.DisplayName Property

Gets or sets the report’s display name. The display name appears in the End-User Designer‘s report tab, and serves as the exported document’s default file name.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core

Declaration

[DefaultValue("")]
[SRCategory(ReportStringId.CatDesign)]
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.

XtraReport-DisplayName

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.

result-static-report-runtime

using DevExpress.XtraReports.UI;

// ...

public static XtraReport CreateReport() {

    // Create an XtraReport instance
    XtraReport report = new XtraReport() {
        Name = "SimpleStaticReport",
        DisplayName = "Simple Static Report",
        PaperKind = PaperKind.Letter,
        Margins = new Margins(100, 100, 100, 100)
    };

    // Create a Detail band for the report
    DetailBand detailBand = new DetailBand() {
        HeightF = 25
    };

    // Add the created Detail band to the report
    report.Bands.Add(detailBand);

    // Create an XRLabel control for the report
    XRLabel helloWordLabel = new XRLabel() {
        Text = "Hello, World!",
        Font = new Font("Tahoma", 20f, FontStyle.Bold),
        BoundsF = new RectangleF(0, 0, 250, 50),
    };

    // Add the created XRLabel to the Detail band
    detailBand.Controls.Add(helloWordLabel);

    // Return the report with a band and a label on it
    return report;
}

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.

See Also