Table of Contents

Class PercentFormat

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

Defines how percent values are formatted and displayed.

public class PercentFormat : FormatBase

Inheritance

objectMarshalByRefObjectComponentFormatBasePercentFormat

Inherited Members

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

Constructors

PercentFormat()

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

public PercentFormat()

Properties

DecimalDigits

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

public int DecimalDigits { get; set; }

Property Value

int

DecimalSeparator

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

public string GroupSeparator { get; set; }

Property Value

string

NegativePattern

Gets or sets the format pattern for negative percent 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 PercentSymbol and n is a number.

ValueAssociated Pattern
0-n %
1-n%
2-%n
3%-n
4%n-
5n-%
6n%-
7-%n
8n %-
9% n-
10% -n
11n- %

PercentSymbol

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

public string PercentSymbol { get; set; }

Property Value

string

PositivePattern

Gets or sets the format pattern for positive percent 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 PercentSymbol and n is a number.

ValueAssociated Pattern
0n %
1n%
2%n
3% 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