IPivotTable.CanEdit

Syntax

CanEdit: Boolean;

Description

The CanEdit property returns whether a table can be edited.

Comments

Available values:

To open a table in the edit mode, use the IPivotTable.Edit method.

To exit the edit mode and save changed table data, use the IPivotTable.Post method; to do the same but without saving changed data, use the IPivotTable.Cancel method.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. The report should contain a table.

Add links to the Express, Metabase and Pivot system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Pivot: IPivot;
    Table: IPivotTable;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get table display settings
    Pivot := Express.Pivot;
    Table := Pivot.ObtainTable;
    // Check if table can be edited
    If Pivot.CanEdit Then
        // Open table in edit mode if it cannot be edited
        Table.Edit;
    End If;
    // Change cell value with the (1,2) coordinate
    Table.Cell(12) := 100;
    // Save changed table data and refresh table
    Table.Post;
    Pivot.Refresh;
End Sub UserProc;

After executing the example, cell value with the (1,2) coordinate is changed to 100 in the express report table.

See also:

IPivotTable