Search code examples
winformsdevexpressxtrareport

DevExpress XtraReport currency thousand separator


I have XtraReport with XtraLabel in detail band for display currency, ex: I have 2000000 and want to display it as 2.000.000, how can I do it?


Solution

  • You can do this by setting the FormatString property of 'Text` data binding as below.

    xrLabel.DataBindings["Text"].FormatString = "{0:C}";
    

    you can set refer Standard Numeric Format Strings and Custom Numeric Format Strings to specify format string that you want to apply.

    References:
    Formatting numeric values as Currency for an XrLabel
    XRLabel - Setting FormatString during Report Generation