DiagnosticReport: IDiagnosticReport;
DiagnosticReport: Prognoz.Platform.Interop.Express.IDiagnosticReport;
The DiagnosticReport property determines the diagnostic report that contains results of validation rule execution.
The property is relevant if the express report is based on a workbook of time series database.
Executing the example requires that the repository contains a time series database with the TSDB identifier that contains a validation rule with the VALID identifier.
It also requires a form that contains the following components:
UiErAnalyzer with the UiErAnalyzer1 identifier. A workbook of the TSDB time series database must be loaded to UiErAnalyzer1
LanerBox with the LanerBox1 identifier. UiErAnalyzer1 is used as a data source for LanerBox1.
Add links to the Metabase, Ms and Cubes system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
RubyObj: IMetabaseObjectDescriptor;
ValiObj: IMetabaseObject;
ValidFilter: IValidationFilter;
ValidExecSett: IValidationExecuteSettings;
Analyzer: IEaxAnalyzer;
ValidExecRun: IValidationExecRun;
DiagRep: IDiagnosticReport;
Begin
Mb := MetabaseClass.Active;
// Get validation rule
RubyObj := Mb.ItemById("TSDB");
ValiObj := Mb.ItemByIdNamespace("VALID", RubyObj.Key).Bind;
ValidFilter := ValiObj As IValidationFilter;
// Execute the rule on a workbook sheet
ValidExecSett := New ValidationExecuteSettings.Create;
Analyzer := UiErAnalyzer1.ErAnalyzer;
ValidExecSett.Laner := Analyzer.Laner;
ValidExecRun := ValidFilter.Execute(ValidExecSett);
// Show results as a diagnostic report
DiagRep := New DiagnosticReport.Create;
DiagRep.Run := ValidExecRun;
Analyzer.DiagnosticReport := DiagRep;
End Sub UserProc;
Example execution results: the VALID validation rule is executed for a sheet of the workbook loaded to UiErAnalyzer1; the results are displayed on the running form.
Executing the example requires that the repository contains a time series database with the TSDB identifier that contains a validation rule with the VALID identifier.
A .NET form with the following components must also be available:
UiErAnalyzerNet with the uiErAnalyzerNet1 identifier. A workbook of the TSDB time series database must be loaded to uiErAnalyzerNet1.
LanerBoxNet with the lanerBoxNet1 identifier. uiErAnalyzerNet1 is used as a data source for lanerBoxNet1.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Ms;
Imports Prognoz.Platform.Interop.Cubes;
…
Public Shared Sub UserProc;
Var
Mb: IMetabase;
RubyObj: IMetabaseObjectDescriptor;
ValiObj: IMetabaseObject;
ValidFilter: IValidationFilter;
ValidExecSett: ValidationExecuteSettings;
Analyzer: IEaxAnalyzer;
ValidExecRun: IValidationExecRun;
DiagRep: DiagnosticReport;
Begin
Mb := Self.Metabase;
// Get validation rule
RubyObj := Mb.ItemById["TSDB"];
ValiObj := Mb.ItemByIdNamespace["VALID", RubyObj.Key].Bind();
ValidFilter := ValiObj As IValidationFilter;
// Execute the rule on a workbook sheet
ValidExecSett := New ValidationExecuteSettings.Create();
Analyzer := uiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
ValidExecSett.Laner := Analyzer.Laner;
ValidExecRun := ValidFilter.Execute(ValidExecSett);
// Show results as a diagnostic report
DiagRep := New DiagnosticReport.Create();
DiagRep.Run := ValidExecRun;
Analyzer.DiagnosticReport := DiagRep;
End Sub;
Example execution results: the VALID validation rule is executed for a sheet of the workbook loaded to uiErAnalyzerNet1; the results are displayed on the running form.
See also: