ILanerCalculateSerie.TransformPeriod

Fore Syntax

TransformPeriod: ILanerTransformPeriod;

Fore.NET Syntax

TransformPeriod: Prognoz.Platform.Interop.Laner.ILanerTransformPeriod;

Description

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

Comments

By default the period of the calculated series calculation matches the period of the workbook calculation:

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

Fore Example

Executing the example requires 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 current repository
    mb := MetabaseClass.Active;
    // Get workbook
    Analyzer := mb.ItemById("WORKBOOK_TR_PERIOD").Edit As IEaxAnalyzer;
    pLaner := Analyzer.Laner;
    // Get the first series in the 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 forecast period can go before sample period
    TransPeriod.AllowForecastBeforeIdent := True;
    // Set start and end dates of sample and forecast periods
    TransPeriod.PeriodSet := LnTransformPeriodSet.All;
    TransPeriod.StartDate := DateTime.Parse("01.01.2000");
    TransPeriod.ForecastStartDate := DateTime.Parse("01.01.1995");
    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 selected calculated series:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Laner;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Analyzer: IEaxAnalyzer;
    pLaner: ILaner;
    pSeries: ILanerCalculateSerie;
    TransPeriod: ILanerTransformPeriod;
Begin
    // Get current repository
    mb := Params.Metabase;
    // Get workbook
    Analyzer := mb.ItemById["WORKBOOK_TR_PERIOD"].Edit() As IEaxAnalyzer;
    pLaner := Analyzer.Laner;
    // Get the first series in the 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 forecast period can go before sample period
    TransPeriod.AllowForecastBeforeIdent := True;
    // Set start and end dates of sample and forecast periods
    TransPeriod.PeriodSet := LnTransformPeriodSet.ltpsAll;
    TransPeriod.StartDate := DateTime.Parse("01.01.2000");
    TransPeriod.ForecastStartDate := DateTime.Parse("01.01.1995");
    TransPeriod.EndDate := DateTime.Parse("01.01.2000");
    // Save changes
    (Analyzer As IMetabaseObject).Save();
End Sub;

See also:

ILanerCalculateSerie