IValidationLegendBox.Analyzer

Syntax

Analyzer: IEaxAnalyzerSource;

Description

The Analyzer property determines a data source for the component.

Comments

The UiErAnalyzer component cast to the IEaxAnalyzerSource interface should be set as a value of this property.

The UiErAnalyzer component must be connected with a workbook, for which appropriate validation rules are applied, and diagnostic test is formed.

Example

Executing the example requires a form with the WorkbookDocumentViewerBox and ValidationLegendBox components, and the UiErAnalyzer named UiErAnalyzer1 that is a data source for them. UiErAnalyzer1 is connected to a repository workbook. It is required that the repository contains a validation rule with the VAL_RULES1 identifier, that is stored in a time series database with the TS_DB identifier.  The specified procedure is a handler of the OnCreate event for the form.

Sub SAMPLEFormOnCreate(Sender: Object; Args: IEventArgs);
Var
    MB: IMetabase;
    ValidFilter: IValidationFilter;
    ValidExecSett: IValidationExecuteSettings;
    ValidExecRun: IValidationExecRun;
    DiagRep: IDiagnosticReport;
    Analyzer: IEaxAnalyzer;
Begin
    MB := MetabaseClass.Active;
    //Rule
    ValidFilter := MB.ItemByIdNamespace("VAL_RULES1", MB.GetObjectKeyById("TS_DB")).Bind As IValidationFilter;
    //Parameters, required to apply validation rule
    Analyzer := UiErAnalyzer1.ErAnalyzer;
    ValidExecSett := New ValidationExecuteSettings.Create;
    ValidExecSett.Laner := Analyzer.Laner;
    //Application of validation rule
    ValidExecRun := ValidFilter.Execute(ValidExecSett);
    //Forming of diagnostic test
    DiagRep := New DiagnosticReport.Create;
    DiagRep.Run := ValidExecRun;
    Analyzer.DiagnosticReport := DiagRep;
    //Specifying of source for component
    ValidationLegendBox1.Analyzer := UiErAnalyzer1 As IEaxAnalyzerSource;
End Sub SAMPLEFormOnCreate;

On the form startup, parameters of the specified validation rule are obtained. This rule will be applied to the workbook, which is connected to the UiErAnalyzer1 component. After application of the rule the diagnostic test is formed. Information about the used validation rule is available in the ValidationLegendBox1 component.

See also:

IValidationLegendBox