IValidationMissingData.SeriesMode

Fore Syntax

SeriesMode: ValidationMissingDataSeriesMode;

Fore.NET Syntax

SeriesMode: Prognoz.Platform.Interop.Ms.ValidationMissingDataSeriesMode;

Description

The SeriesMode property determines the mode of saving found exceptions.

Comments

By default exceptions are unloaded by all points containing empty values, that is, the property is set to ValidationMissingDataSeriesMode.None.

Fore Example

Executing the example requires that the repository contains a time series database with the TSDB_VALIDATION_PARAMETERS identifier containing a validation rule with the VALIDATION identifier.

Add links to the Cubes, Dimensions, Drawing, Laner, Metabase, Ms, Tab system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    RubrKey: Integer;
    ValidObj: IMetabaseObject;
    ValidFilter: IValidationFilter;
    FilterSett: IValidationFilterSettings;
    Color: IGxColor;
    Brush: IGxSolidBrush;
    MissingData: IValidationMissingData;
    SelectionValList: IValidationSelectionValueList;
    SelectionFilter: IValidationSelectionFilter;
Begin
    Mb := MetabaseClass.Active;
    RubrKey := Mb.GetObjectKeyById("TSDB_VALIDATION_PARAMETERS");
    // Get validation rule
    ValidObj := Mb.ItemByIdNamespace("VALIDATION", RubrKey).Edit;
    ValidFilter := ValidObj As IValidationFilter;
    // Validation is made by annual data
    ValidFilter.Level := DimCalendarLevel.Year;
    // Get validation rule settings
    FilterSett := ValidFilter.Settings;
    // Set exception formatting
    Color := New GxColor.CreateRGB(218150148);
    Brush := New GxSolidBrush.Create(Color);
    FilterSett.CellStyle.TabStyle.BackgroundBrush := Brush;
    // Determine validation type: Missing data
    ValidFilter.Kind := ValidationDetailsKind.MissingData;
    // Set up validation parameters
    MissingData := ValidFilter.Details As IValidationMissingData;
    // Determine scope of missing data detecting
    MissingData.Type := ValidationMissingDataType.InData;
    MissingData.SeriesMode := ValidationMissingDataSeriesMode.None;
    // Determine that validation is applied to the whole time series database
    SelectionValList := MissingData.SelectionTargetData;
    SelectionValList.Clear;
    // Clear validation filter
    SelectionFilter := MissingData.SelectionFilter;
    SelectionFilter.Clear;
    // Save changes in rule
    ValidObj.Save;
End Sub UserProc;

After executing the example the Missing Data validation rule is set up. This rule will detect missing data inside annual data.

Fore.NET Example

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Laner;
Imports Prognoz.Platform.Interop.Ms;
Imports Prognoz.Platform.Interop.Tab;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    RubrKey: uinteger;
    ValidObj: IMetabaseObject;
    ValidFilter: IValidationFilter;
    FilterSett: IValidationFilterSettings;
    
    Color: GxColor;
    Brush: IGxSolidBrush;
    MissingData: IValidationMissingData;
    SelectionValList: IValidationSelectionValueList;
    SelectionFilter: IValidationSelectionFilter;
Begin
    Mb := Params.Metabase;
    RubrKey := Mb.GetObjectKeyById("TSDB_VALIDATION_PARAMETERS");
    // Get validation rule
    ValidObj := Mb.ItemByIdNamespace["VALIDATION", RubrKey].Edit();
    ValidFilter := ValidObj As IValidationFilter;
    // Validation is made by annual data
    ValidFilter.Level := DimCalendarLevel.dclYear;
    // Get validation rule settings
    FilterSett := ValidFilter.Settings;
    // Set exception formatting
    Color := New GxColorClass_2.Create();
    Color.CreateRGB(218150148);
    Brush := New GxSolidBrushClass.Create();
    Brush.Create(Color);
    FilterSett.CellStyle.TabStyle.BackgroundBrush := Brush;
    // Determine validation type: Missing data
    ValidFilter.Kind := ValidationDetailsKind.vdkMissingData;
    // Set up validation parameters
    MissingData := ValidFilter.Details As IValidationMissingData;
    // Determine scope of missing data detecting
    MissingData.Type := ValidationMissingDataType.vmdtInData;
    MissingData.SeriesMode := ValidationMissingDataSeriesMode.vmdsmNone;
    // Determine that validation is applied to the whole time series database
    SelectionValList := MissingData.SelectionTargetData;
    SelectionValList.Clear();
    // Clear validation filter
    SelectionFilter := MissingData.SelectionFilter;
    SelectionFilter.Clear();
    // Save changes in rule
    ValidObj.Save();
End Sub;

See also:

IValidationMissingData