PeriodSet: TransformModelPeriodSet;
The PeriodSet property determines parameters of series calculation period.
The PeriodSet value influences the parameters, which will be redetermined for a calculated series.
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(2013, 1, 1);
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: