Table of Contents

Class CurrencyFormat

Namespace: FastReport.Olap.Format
Assembly: FastCube.Core.dll

Defines how currency values are formatted and displayed.

public class CurrencyFormat : FormatBase

Inheritance

objectMarshalByRefObjectComponentFormatBaseCurrencyFormat

Inherited Members

FormatBase.Name, FormatBase.Clone(), FormatBase.FormatValue(object), FormatBase.Load(XmlItem), FormatBase.Save(XmlItem)

Constructors

CurrencyFormat()

Initializes a new instance of the CurrencyFormat class with default settings.

public CurrencyFormat()

Properties

CurrencySymbol

Gets or sets the string to use as the currency symbol.

public string CurrencySymbol { get; set; }

Property Value

string

DecimalDigits

Gets or sets the number of decimal places to use in currency values.

public int DecimalDigits { get; set; }

Property Value

int

DecimalSeparator

Gets or sets the string to use as the decimal separator in currency values.

public string DecimalSeparator { get; set; }

Property Value

string

GroupSeparator

Gets or sets the string that separates groups of digits to the left of the decimal in currency values.

public string GroupSeparator { get; set; }

Property Value

string

NegativePattern

Gets or sets the format pattern for negative currency values.

public int NegativePattern { get; set; }

Property Value

int

Remarks

This property can have one of the values in the following table. The symbol "$" is the CurrencySymbol and n is a number.

ValueAssociated Pattern
0($n)
1-\(n</td></tr><tr><td class="term">2</td><td class="description">\)-n
3\(n-</td></tr><tr><td class="term">4</td><td class="description">(n\))
5-n$
6n-\(</td></tr><tr><td class="term">7</td><td class="description">n\)-
8-n \(</td></tr><tr><td class="term">9</td><td class="description">-\) n
10n \(-</td></tr><tr><td class="term">11</td><td class="description">\) n-
12\(-n</td></tr><tr><td class="term">13</td><td class="description">n-\)
14(\(n)</td></tr><tr><td class="term">15</td><td class="description">(n\))

PositivePattern

Gets or sets the format pattern for positive currency values.

public int PositivePattern { get; set; }

Property Value

int

Remarks

This property can have one of the values in the following table. The symbol "$" is the CurrencySymbol and n is a number.

ValueAssociated Pattern
0\(n</td></tr><tr><td class="term">1</td><td class="description">n\)
2\(n</td></tr><tr><td class="term">3</td><td class="description">n\)

UseLocale

Gets or sets a value that determines whether to use system locale settings to format a value.

public bool UseLocale { get; set; }

Property Value

bool

Methods

Clone()

Creates exact copy of this format.

public override FormatBase Clone()

Returns

FormatBase

The copy of this format.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

FormatValue(object)

Formats the specified value.

public override string FormatValue(object value)

Parameters

value object

The value to format.

Returns

string

The string that represents the formatted value.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Load(XmlItem)

Loads format from XML

public override void Load(XmlItem item)

Parameters

item XmlItem

Save(XmlItem)

Saves format to XML

public override void Save(XmlItem item)

Parameters

item XmlItem