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

To execute the example, place on the form the Button named Button1, the UiErAnalyzer component named UiErAnalyzer1, and the TabSheetBox component named TabSheetBox1. Specify UiErAnalyzer1 as a data source for TabSheetBox1 in the Source property. The express report specified in the Object property is a data source for UiErAnalyzer1. Set the Active property to True for UiErAnalyzer1.

Add links to the Cubes, Express, Forms, MathFin, Pivot, and Tab system assemblies.

The example is a handler of the OnClick event for the Button1 component.

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. Refreshed data is saved to the data source. Errors that can occur during saving, are handled in the SaveCallback custom class.

See also:

IPivotTable