ITabFormatNumericScale.GetMaxValue

Fore Syntax

GetMaxValue: Double;

Fore.NET 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.

Fore Example

To execute the example the repository must contain 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.

Fore.NET Example

The requirements and result of Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    RegRep: IPrxReport;
    Tab: IPrxTable;
    Sheet: ITabSheet;
    Range: ITabRange;
    FormCond: ITabFormatCondition;
    Scale: ITabFormatNumericScale;
Begin
    // Get repository
    MB := Params.Metabase;
    // 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
    System.Diagnostics.Debug.WriteLine("Maximum font size = " + Scale.GetMaxValue().ToString());
    System.Diagnostics.Debug.WriteLine("Minimum font size = " + Scale.GetMinValue().ToString());
End Sub;

See also:

ITabFormatNumericScale