ILanerCalculateSerie.TransformPeriod

Syntax

TransformPeriod: ILanerTransformPeriod;

Description

The TransformPeriod property returns the options of the calculated series calculation period.

Comments

It is used to change the calculation period of a certain series, not of the whole workbook.

By default, the calculated series calculation periods matches with the workbook calculation period:

Example

Executing the example requires that the repository contains a workbook with the WORKBOOK_TR_PERIOD identifier containing a first series that is a calculated one.

Add links to the Express, Laner and Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Analyzer: IEaxAnalyzer;
    pLaner: ILaner;
    pSeries: ILanerCalculateSerie;
    TransPeriod: ILanerTransformPeriod;
Begin
    // Get the current repository
    mb := MetabaseClass.Active;
    // Get workbook
    Analyzer := mb.ItemById("WORKBOOK_TR_PERIOD").Edit As IEaxAnalyzer;
    pLaner := Analyzer.Laner;
    // Get the first series in workbook
    pSeries := pLaner.Series.Item(0As ILanerCalculateSerie;
    // Get series calculation period parameters
    TransPeriod := pSeries.TransformPeriod;
    // Specify that use forecast start date
    TransPeriod.IsUsingForecastStart := True;
    // Specify that forecasting period can be before sample period
    TransPeriod.AllowForecastBeforeIdent := True;
    // Set start and end dates of sample and forecasting periods
    TransPeriod.PeriodSet := LnTransformPeriodSet.All;
    TransPeriod.StartDate := DateTime.Parse("01.01.2000");
    TransPeriod.EndDate := DateTime.Parse("01.01.2000");
    // Save changes
    (Analyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the following calculation period parameters are set for the calculated series in the workbook:

See also:

ILanerCalculateSerie