DiagnosticReport: IDiagnosticReport;
DiagnosticReport: Prognoz.Platform.Interop.Express.IDiagnosticReport;
The DiagnosticReport property determines the diagnostic report that contains results of validation rule execution.
This 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 identifier TSDB that contains a validation rule with the identifier VALID.
It also requires a form that contains the following components:
UiErAnalyzer with the identifier UiErAnalyzer1. A workbook of the time series database TSDB must be loaded to UiErAnalyzer1.
LanerBox with the identifier LanerBox1. UiErAnalyzer1 is used as a data source for LanerBox1.
Add the 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 validation rule VALID is executed for a sheet of the workbook loaded to UiErAnalyzer1; the results are displayed on the launched form.
Executing the example requires that the repository contains a time series database with the identifier TSDB that contains a validation rule with the identifier VALID.
A .NET form with the following components must be also available:
UiErAnalyzerNet with the identifier uiErAnalyzerNet1. A workbook of the time series database TSDB must be loaded to uiErAnalyzerNet1.
LanerBoxNet with the identifier lanerBoxNet1. 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 validation rule VALID is executed for a sheet of the workbook loaded to uiErAnalyzerNet1; the results are displayed on the launched form.
See also: