IFormulaTransformModel.PeriodSet

Syntax

PeriodSet: TransformModelPeriodSet;

Description

The PeriodSet property determines parameters of series calculation period.

Comments

The PeriodSet value influences the parameters, which will be redetermined for a calculated series.

Example

Executing the example requires a form, a button with the Button1 identifier on the form, the LanerBox component and the UiErAnalyzer component named UiErAnalyzer1, which is a data source for LanerBox. A workbook of the time series database must be loaded to UiErAnalyzer1. This database must contain a factor with the 98280 key and a formula with the 1 key.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Laner: ILaner;
    RubInst: IRubricatorInstance;
    Factor: IRubricatorFactor;
    Serie: ILanerCalculateSerie;
    FormulaData: IRubricatorFormulaData;
    Transform: IFormulaTransformModel;
Begin
    Laner := UiErAnalyzer1.ErAnalyzer.Laner;
    RubInst := Laner.RubricatorInstance;
    Laner.BeginUpdate;
    Factor := RubInst.GetFactData(98280).Factor;
    Serie := Laner.Series.AddCalculateSerieAsSource(Factor);
    Serie.UseTransform := True;
    Transform := Serie.Transform;
    FormulaData := RubInst.GetFormulaData(1);
    Transform.RestoreFromFormulaData(FormulaData);
    Transform.PeriodSet := TransformModelPeriodSet.ForecastEndDate;
    Transform.ForecastEndDate := DateTime.ComposeDay(201311);
    Laner.EndUpdate;
End Sub Button1OnClick;

After executing the example the series based on the factor with the 98280 key is added to the workbook. The formula with the 1 key is applied for the series and forecast end date is changed.

See also:

IFormulaTransformModel