IDiagnosticReport.Explanation

Syntax

Explanation(Row: Integer; Column: Integer): String;

Parameters

Row. The row with a point.

Column. The column with a point.

Description

The Explanation property determines explanation for a specified point.

Example

Executing the example requires a form with a button named Button1 on the form, the Memo component named Memo1, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for TabSheetBox. A workbook of time series database with the OBJ_FC identifier should be loaded to UiErAnalyzer1. This database should contain a validation filter with the VALIDATION_F identifier.

The example is executed on clicking the button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Mb: IMetabase;
    RurkKey: Integer;
    ValidFilterObj: IMetabaseObject;
    ValidFilter: IValidationFilter;
    ValidExecSett: IValidationExecuteSettings;
    Analyzer: IEaxAnalyzer;
    Res: IValidationExecRun;
    DiagnRep: IDiagnosticReport;
    ValidationRules: IValidationRules;
    i: Integer;
Begin
    Mb := MetabaseClass.Active;
    RurkKey := Mb.GetObjectKeyById("OBJ_FC");
    ValidFilterObj := Mb.ItemByIdNamespace("VALIDATION_F", RurkKey).Bind;
    ValidFilter := ValidFilterObj As IValidationFilter;
    ValidExecSett := New ValidationExecuteSettings.Create;
    Analyzer := UiErAnalyzer1.ErAnalyzer;
    ValidExecSett.Laner := Analyzer.Laner;
    Res := ValidFilter.Execute(ValidExecSett);
    DiagnRep := New DiagnosticReport.Create;
    DiagnRep.Run := Res;
    DiagnRep.EaxAnalyzer := Analyzer;
    DiagnRep.ShowExplainedExceptions := False;
    ValidationRules := DiagnRep.Exceptions(11);
    If ValidationRules.Count > 0 Then
        Memo1.Lines.Add("Explanation: " + DiagnRep.Explanation(11));
        For i := 0 To ValidationRules.Count - 1 Do
            Memo1.Lines.Add("Rule No." + i.ToString);
            Memo1.Lines.Add("  Filter name = " + (ValidationRules.Item(i) As IMetabaseObject).Name);
        End For;
    Else 
        Memo1.Lines.Add("No rule is executed for this cell");
    End If;
End Sub Button1OnClick;

After executing the example the TabSheetBox component shows diagnostic report data. The Memo component shows explanation and data concerning the rules performed for the specified working area cell.

See also:

IDiagnosticReport