Back to Devexpress

XRZipCode Class

xtrareports-devexpress-dot-xtrareports-dot-ui-09d9a963.md

latest3.7 KB
Original Source

XRZipCode Class

Renders a numeric postal code that is used to identify the mail address in some countries. This control is not related to the Zone Improvement Plan (ZIP) code used by the United States Postal Service.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[DefaultBindableProperty("Text")]
public class XRZipCode :
    XRFieldEmbeddableControl
vb
<DefaultBindableProperty("Text")>
Public Class XRZipCode
    Inherits XRFieldEmbeddableControl

Remarks

The XRZipCode control renders a numeric postal code that is used to identify the mail address in some countries. This control is not related to the Zone Improvement Plan (ZIP) code used by the United States Postal Service.

A postal code can only display numeric characters and dashes. Other characters are displayed as empty boxes.

To add this control to a report, drag the XRZipCode item from the DX:25.2: Report Controls Toolbox tab and drop it onto the report.

To specify the text for the control, use the XRZipCode.Text property.

Bind a Postal Code to Data

The Text property can be bound to a data field obtained from the data source. To do this, click the control’s smart tag and in its actions list, expand the Expression drop-down list and select the required data field.

Clicking the Expression option’s ellipsis button invokes the Expression Editor , in which you can construct a complex expression involving two or more data fields.

See the Bind Report Controls to Data topic to learn more about available data binding modes and creating data-aware controls.

Add a Zip Code to End-User Report Designers

The Toolbox of End-User Report Designers does not contain the XRZipCode control by default.

To register this control, do one of the following (depending on your target platform):

  • Windows Forms

  • WPF

  • ASP.NET

Implements

IScriptable

Inheritance

Object MarshalByRefObject Component XRControl XRFieldEmbeddableControl XRZipCode

See Also

XRZipCode Members

Add Controls to a Report

DevExpress.XtraReports.UI Namespace