ITabFormatNumericScale.GetMaxValue

Syntax

GetMaxValue: Double;

Description

The GetMaxValue method returns the maximum value of the numeric scale.

Comments

If maximum value of numeric scale is not set, the method returns the 10 value.

Use ITabFormatNumericScale.GetMinValue to determine minimum value of numeric scale.

Example

Executing the example requires that the repository contains a regular report with the REG_SCALE identifier. It is necessary to set maximum and minimum values of numeric scale for cell range. How to set the values is given in the example for ITabFormatNumericScale.TargetType.

Add links to the Metabase, Report, Tab system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    RegRep: IPrxReport;
    Tab: IPrxTable;
    Sheet: ITabSheet;
    Range: ITabRange;
    FormCond: ITabFormatCondition;
    Scale: ITabFormatNumericScale;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get regular report
    RegRep := MB.ItemById("REG_SCALE").Bind As IPrxReport;
    // Get active report sheet
    Tab := RegRep.ActiveSheet As IPrxTable;
    // Get report sheet table
    Sheet := Tab.TabSheet;
    // Get cell range
    Range := Sheet.ParseRange("A0:K25");
    // Get conditional format
    FormCond := Range.FormatConditions.Item(0);
    // Get specific settings of conditional format
    Scale := FormCond.Details As ITabFormatNumericScale;
    // Display to the console minimum and maximum font size
    Debug.WriteLine("Maximum font size = " + Scale.GetMaxValue.ToString);
    Debug.WriteLine("Minimum font size = " + Scale.GetMinValue.ToString);
End Sub UserProc;

After executing the example, maximum and minimum font sizes are displayed.

See also:

ITabFormatNumericScale