IDiagnosticReport.Run

Syntax

Run: IValidationExecRun;

Description

The Run property determines validation execution data to be shown in the report.

Example

Executing this example requires a form with a button named Button1 positioned on this form, the Memo component with the identifier Memo1, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 which is used as a data source for TabSheetBox. The workspace of time series database with the OBJ_FC identifier must be loaded to UiErAnalyzer1. The validation filter with the VALIDATION_F identifier must be in this base.

Press the button to start executing this example.

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(1, 1);

If ValidationRules.Count > 0 Then

Memo1.Lines.Add("Explanation: " + DiagnRep.Explanation(1, 1));

For i := 0 To ValidationRules.Count - 1 Do

Memo1.Lines.Add("Rule ?" + i.ToString);

Memo1.Lines.Add("  Name = " + (ValidationRules.Item(i) As IMetabaseObject).Name);

End For;

Else Memo1.Lines.Add("No rules are performed for this cell");

End If;

End Sub Button1OnClick;

After executing this 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