Table of Contents

Class NumberFormat

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

Defines how numeric values are formatted and displayed.

public class NumberFormat : FormatBase

Inheritance

objectMarshalByRefObjectComponentFormatBaseNumberFormat

Inherited Members

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

Constructors

NumberFormat()

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

public NumberFormat()

Properties

DecimalDigits

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

public int DecimalDigits { get; set; }

Property Value

int

DecimalSeparator

Gets or sets the string to use as the decimal separator in numeric 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 numeric values.

public string GroupSeparator { get; set; }

Property Value

string

NegativePattern

Gets or sets the format pattern for negative numeric values.

public int NegativePattern { get; set; }

Property Value

int

Remarks

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

ValueAssociated Pattern
0(n)
1-n
2- n
3n-
4n -

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