Class CurrencyFormat
Defines how currency values are formatted and displayed.
Implements
Inherited Members
Namespace: FastReport.Format
Assembly: FastReport.OpenSource.dll
Syntax
public class CurrencyFormat : FormatBase, IFRSerializable
Constructors
CurrencyFormat()
Initializes a new instance of the CurrencyFormat class with default settings.
Declaration
public CurrencyFormat()
Properties
CurrencySymbol
Gets or sets the string to use as the currency symbol.
Declaration
public string CurrencySymbol { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DecimalDigits
Gets or sets the number of decimal places to use in currency values.
Declaration
public int DecimalDigits { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
DecimalSeparator
Gets or sets the string to use as the decimal separator in currency values.
Declaration
public string DecimalSeparator { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
GroupSeparator
Gets or sets the string that separates groups of digits to the left of the decimal in currency values.
Declaration
public string GroupSeparator { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
NegativePattern
Gets or sets the format pattern for negative currency values.
Declaration
public int NegativePattern { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Remarks
This property can have one of the values in the following table. The symbol "$" is the CurrencySymbol and n is a number.
| Value | Associated Pattern |
|---|---|
| 0 | ($n) |
| 1 | -$n |
| 2 | $-n |
| 3 | $n- |
| 4 | (n$) |
| 5 | -n$ |
| 6 | n-$ |
| 7 | n$- |
| 8 | -n $ |
| 9 | -$ n |
| 10 | n $- |
| 11 | $ n- |
| 12 | $ -n |
| 13 | n- $ |
| 14 | ($ n) |
| 15 | (n $) |
PositivePattern
Gets or sets the format pattern for positive currency values.
Declaration
public int PositivePattern { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Remarks
This property can have one of the values in the following table. The symbol "$" is the CurrencySymbol and n is a number.
| Value | Associated Pattern |
|---|---|
| 0 | $n |
| 1 | n$ |
| 2 | $ n |
| 3 | n $ |
UseLocale
Gets or sets a value that determines whether to use system locale settings to format a value.
Declaration
public bool UseLocale { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
Clone()
Creates exact copy of this format.
Declaration
public override FormatBase Clone()
Returns
| Type | Description |
|---|---|
| FormatBase | The copy of this format. |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
FormatValue(Object)
Formats the specified value.
Declaration
public override string FormatValue(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | value | The value to format. |
Returns
| Type | Description |
|---|---|
| System.String | The string that represents the formatted value. |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |