Post([Callback: ICubeCallback = Null]);
Callback.Object that handles errors that may occur on saving data.
The Post method cancels the edit mode and saves modified table data.
If saving is mage from dashboard or express report displaying data from time series database with the Attributes selected layout option , then value saving is available for:
Observation attributes.
Attributes that are not a link to dictionary or that are not attributes of this dictionary.
Attributes with only one value.
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(100, 500);
End For;
End For;
Table.Post(CallBack);
Pivot.Refresh;
End Sub Button1OnClick;
After executing this example, clicking the button generates random values for all table cells. Updated data is saved in a data source. Errors that can arise during saving, are processed in the SaveCallback user class.
See also: