The requested page is not available for the requested platform. You are viewing the content for Default platform.

XRLabel.Multiline Property

Gets or sets a value specifying whether carriage returns (CRLF) stored in a label's text should be processed.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll


public bool Multiline { get; set; }
Public Property Multiline As Boolean

Property Value

Type Default Description


true if carriage returns should be processed; otherwise, false.


Set this property's value to true (process carriage returns) to display more than one line of text in the XRLabel control.

The following can be used as newline characters:

  • NewLine.
  • ControlChars.CrLf.
  • vbCrLf (Visual Basic only).


This example demonstrates how to create an XRLabel object, bind it to data and specify some of its properties. You should bind your report to the Products table of the Northwind database for this example to work properly.

To learn about the events available for a report and its controls, see Report Events.

using System;
using System.Drawing;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
// ...

public partial class XtraReport1 : XtraReport {

    public XRLabel CreateXRLabel() {
        // Create a new label object.
        XRLabel label = new XRLabel();

        // Bind the label to the UnitPrice data field. 
        // Change the label's foreground color depending on the UnitPrice data field value.
        label.ExpressionBindings.AddRange(new ExpressionBinding[] {
        new ExpressionBinding("BeforePrint", "Text", "[UnitPrice]"),
        new ExpressionBinding("BeforePrint", "ForeColor", "Iif([UnitPrice]>20, \'Red\', \'Green\')")});

        // Apply a currency format to the label's text.
        label.TextFormatString = "{0:c2}";

        // Automatically adjust the label's width to its content.
        label.AutoWidth = true;

        // Align the label's text to the bottom right corner.
        label.TextAlignment = TextAlignment.BottomRight;

        return label;

    public XtraReport1() {
        // ...
        // Add the label to the report's Detail band.
        XRLabel label = CreateXRLabel();
See Also