ITabRange.Value

Fore Syntax

Value: Variant;

Fore.NET Syntax

Value: object;

Description

The Value property determines value of a cell range.

Comments

On changing the range value, text is also changed. If formatted text is set for the range, the Value property can be used to get its actual string view without taking formatting into account.

The Value property value of the cell, for which editor is determined, is checked before setting if it corresponds to editor data type. The value that does not corresponds to editor data type is not set. The editor is determined by the ITabCellStyle.Binding property.

Fore Example

Executing the example requires that the repository contains a regular report with the REG_REP identifier.

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

Sub UserProc;
Var
    MB: IMetabase;
    Regrep: IPrxReport;
    Sheet: IPrxSheet;
    Table: IPrxTable;
    Tsheet: ITabSheet;
    Column: ITabRange;
    i: Integer = 0;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Get regular report
    Regrep := MB.ItemById("REG_REP").Edit As IPrxReport;
    // Get regular report sheet table
    Sheet := Regrep.Activesheet;
    Table := Sheet As IPrxTable;
    TSheet := Table.TabSheet;
    // Fill (A0:J9) cell range with data
    While (i <= 9Do
        Column := Tsheet.Cells(0, i, 9, i);
        i := i + 1;
        Column.Value := i;
    End While;
    (Regrep As IMetabaseObject).Save;
End Sub UserProc;

After executing the example cells of the (A0:J9) range are filled with numbers from 1 to 10.

Fore.NET Example

The requirements and result of the 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;
    Sheet: IPrxSheet;
    Table: IPrxTable;
    Tsheet: ITabSheet;
    Column: ITabRange;
    i: integer = 0;
Begin
    // Get current repository
    MB := Params.Metabase;
    // Get regular report
    Regrep := MB.ItemById["REG_REP"].Edit() As IPrxReport;
    // Get regular report sheet table
    Sheet := Regrep.Activesheet;
    Table := Sheet As IPrxTable;
    TSheet := Table.TabSheet;
    // Fill (A0:J9) cell range with data
    While (i <= 9Do
        Column := Tsheet.Cells[0, i, 9, i];
        i := i + 1;
        Column.Value := i;
    End While;
    (Regrep As IMetabaseObject).Save();
End Sub;

See also:

ITabRange

Related work items:

Requirement 1231403