IRubricatorAutoPeriodDate.ShiftDateInwardsPeriodLevel

Syntax

ShiftDateInwardsPeriodLevel: DimCalendarLevel;

Description

The ShiftDateInwardsPeriodLevel property determines the level of calendar frequency, for which it is checked if the data overrides the period.

Comments

The default value of the field is DimCalendarLevel.Year, that is, annual frequency.

Example

Executing the example requires that the repository contains a time series database with the TS_DB identifier containing thean import object with the OBJ_IMP identifier. The import object is used to import weekly data.

Add links to the Metabase, Cubes and Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    RubKey: Integer;
    Obj: IMetabaseObject;
    ImportRequestDef: IImportRequestDefinition;
    ImpParams: IImportRequestProviderParams;
    ImpPeriod: IRubricatorAutoPeriod;
    sDate, eDate: IRubricatorAutoPeriodDate;
Begin
// Obtain an import object
    MB := MetabaseClass.Active;
    RubKey := MB.GetObjectKeyById("TS_DB");
    Obj := MB.ItemByIdNamespace("OBJ_IMP", RubKey).Edit;
    ImportRequestDef := Obj As IImportRequestDefinition;
// Edit import parameters
    ImpParams := ImportRequestDef.ProviderParams;
    ImpPeriod := ImpParams.AutoPeriod;
// Specify parameters of starting data import   
    sDate := ImpPeriod.Start;
    sDate.AutoDateType := RubricatorAutoDateType.Exact;
    sDate.ExactDate := DateTime.ComposeDay(20000103);
    sDate.ShiftDateInwardsPeriod := True;
    sDate.ShiftDateInwardsPeriodLevel := DimCalendarLevel.Week;
// Specify parameters of ending data import
    eDate := ImpPeriod.End_;
    eDate.AutoDateType := RubricatorAutoDateType.Exact;
    eDate.ExactDate := DateTime.ComposeDay(20001231);
    eDate.ShiftDateInwardsPeriod := True;
    eDate.ShiftDateInwardsPeriodLevel := DimCalendarLevel.Week;
// Save changes  
    Obj.Save;
End Sub UserProc;

Example execution result: on data import using the OBJ_IMP object, start and end dates of the import will be shifted one point inside the period if they override the import period.

See also:

IRubricatorAutoPeriodDate