IPivotTable.Post

Syntax

Post([Callback: ICubeCallback = Null]);

Parameters

Callback. Object that handles errors that may occur on saving data.

Description

The Post method exits the edit mode and saves changed table data.

Comments

If saving is made from dashboard or express report displaying data from time series database with the selected Attributes display version , value saving is available for:

Example

Executing the example requires a form, a button with the Button1 identifier on this form, the TabSheetBox component and the UiErAnalyzer component with the UiErAnalyzer1 identifier, that is a data source for TabSheetBox.

Class SaveCallback: Object, ICubeCallback
    
Public Sub OnCallback(Argument: ICubeCallbackArgument);
    
Begin
        Debug.WriteLine(
"Error: " + Argument.Error.Message);
        Debug.WriteLine(
"Error identifier: " + Argument.Error.MessageID.ToString);
        Debug.WriteLine(
"Source: " + Argument.Error.Source);
        Argument.IgnoreError := 
True;
    
End Sub OnCallback;
    
    
Public Function get_Argument: ICubeCallbackArgument;
    
Begin
        
Return Null;
    
End Function get_Argument;
End Class SaveCallback;

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    CallBack: SaveCallback;
    OLAP: IEaxAnalyzer;
    Pivot: IPivot;
    Table: IPivotTable;
    i, j: Integer;
Begin
    CallBack := 
New SaveCallback.Create;
    OLAP := UiErAnalyzer1.ErAnalyzer;
    Pivot := OLAP.Pivot;
    Table := Pivot.ObtainTable;
    Table.Edit;
    
For i := 0 To Table.RowCount - 1 Do
        
For j := 0 To Table.ColumnCount - 1 Do
            Table.Cell(i, j) := Math.RandBetweenI(
100500);
        
End For;
    
End For;
    Table.Post(CallBack);
    Pivot.Refresh;
End Sub Button1OnClick;

After executing the example clicking the button generates random values for all table cells. Updated data is saved in a data source. Errors that can occur during saving, are handled in the SaveCallback custom class.

See also:

IPivotTable