IsDataChanged: Boolean;
The IsDataChanged property determines whether there are changed values in the data area (data areas).
The property is available to write and can be reset if required (set to False), after that it is considered that values are not changed in the data area.
Executing the example requires a form, a button on this form named the Button1, the ReportBox component and the UiReport component named UiReport1.
Class TestForm: Form
UiReport1: UiReport;
ReportBox1: ReportBox;
Button1: Button;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Report: IPrxReport;
Sheet: IPrxSheet;
DataChage: IPrxDataChange;
Callback: CubeCallback;
Begin
Report := UiReport1.Instance As IPrxReport;
Sheet := Report.ActiveSheet;
DataChage := Sheet As IPrxDataChange;
If DataChage.IsDataChanged Then
Callback := New CubeCallback.Create;
DataChage.SaveData(Callback);
Callback := Null;
End If;
End Sub Button1OnClick;
End Class TestForm;
Class CubeCallback: 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 CubeCallback;
Executing this example and clicking the button saves modified values of all data areas of active report sheet. An object of the CubeCallback class is used to handle errors that may occur while saving data. All errors are to be ignored. Information on errors is to be displayed in the development environment console.
See also: