SeriesMode: ValidationMissingDataSeriesMode;
The SeriesMode property determines the mode of saving found exceptions.
By default, exceptions are loaded by all points containing empty values, that is, the property is set to ValidationMissingDataSeriesMode.None.
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(218, 150, 148);
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.
See also: