IUiErAnalyzerDataRefreshEventArgs.IsDataChanged

Fore Syntax

IsDataChanged: Boolean;

Fore.NET Syntax

IsDataChanged: Boolean;

Description

The IsDataChanged property returns the attribute of modified data in the express report.

 Fore Example

Executing this example requires a form with the Button1 button, the UiErAnalyzer component named UiErAnalyzer1 and the TabSheetBox component named TabSheetBox1. Add links to the Express, Pivot and Ui system assemblies.

Class SAMPLEForm: Form
    UiErAnalyzer1: UiErAnalyzer;
    TabSheetBox1: TabSheetBox;
    Button1: Button;
    olap: IEaxAnalyzer;
    pivot: IPivot;
    
    Sub SAMPLEFormOnCreate(Sender: Object; Args: IEventArgs);
    Begin
        olap := UiErAnalyzer1.ErAnalyzer;
        olap.EnableEdit := True;
        pivot := olap.Pivot;
    End Sub SAMPLEFormOnCreate;
    
    Sub UiErAnalyzer1OnBeforeDataRefresh(Sender: IUiErAnalyzer; Args: IUiErAnalyzerDataRefreshEventArgs);
    Begin
        If Args.IsDataChanged Then
            If WinApplication.ConfirmationBox("Data is changed and will be lost on updating, save changes?"Then
                Args.SaveChangedData := True;
            End If;
        Else
            WinApplication.InformationBox("Data is not changed");
        End If;
    End Sub UiErAnalyzer1OnBeforeDataRefresh;

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Begin
        pivot.Refresh;
    End Sub Button1OnClick;
End Class SAMPLEForm;

On executing the example, make changes in a data area cell, and click the Button1 button. The following message appears: Data was changed and will be lost on refreshing, do you want to save the data? If the answer is positive, changes are saved.

 Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
Imports Prognoz.Platform.Interop.Ui;

Public Partial Class SAMPLEForm: Prognoz.Platform.Forms.Net.ForeNetForm
    Public Constructor SAMPLEForm();
    Begin
        InitializeComponent();
    End Constructor;
    
    olap: IUiErAnalyzer;
    pivot: IPivot;

    Private Sub SAMPLEForm_Load(sender: System.Object; e: System.EventArgs);
    Begin
        olap := UiErAnalyzerNet1.ErAnalyzer;
        olap.ErAnalyzer.EnableEdit := True;
        pivot := olap.ErAnalyzer.Pivot;
    End Sub;

    Private Sub uiErAnalyzerNet1_OnBeforeDataRefresh(Sender: Prognoz.Platform.Interop.Express.UiErAnalyzer; Args: Prognoz.Platform.Interop.Express.UiErAnalyzerDataRefreshEventArgs);
    Var
        WinApp: WinApplicationClassClass = New WinApplicationClassClass();
    Begin
        If Args.IsDataChanged Then
            If WinApp.ConfirmationBox("Data is changed and it will be lost on updating, save it?"NullThen
                Args.SaveChangedData := True;
            End If;
        Else
            WinApp.InformationBox("Data is not changed"Null);
        End If;
    End Sub;

    Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
    Begin
        pivot.Refresh();
    End Sub;
End Class;

See also:

IUiErAnalyzerDataRefreshEventArgs