Class PercentFormat
Namespace: FastReport.Olap.Format
Assembly: FastCube.Core.dll
Defines how percent values are formatted and displayed.
public class PercentFormat : FormatBase
Inheritance
object ← MarshalByRefObject ← Component ← FormatBase ← PercentFormat
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
DecimalSeparator
Gets or sets the string to use as the decimal separator in percent values.
public string DecimalSeparator { get; set; }
Property Value
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
NegativePattern
Gets or sets the format pattern for negative percent values.
public int NegativePattern { get; set; }
Property Value
Remarks
This property can have one of the values in the following table. The symbol "%" is the PercentSymbol 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- % |
PercentSymbol
Gets or sets the string to use as the percent symbol.
public string PercentSymbol { get; set; }
Property Value
PositivePattern
Gets or sets the format pattern for positive percent values.
public int PositivePattern { get; set; }
Property Value
Remarks
This property can have one of the values in the following table. The symbol "%" is the PercentSymbol 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.
public bool UseLocale { get; set; }
Property Value
Methods
Clone()
Creates exact copy of this format.
public override FormatBase Clone()
Returns
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
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
The string that represents the formatted value.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
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