ILanerTransformPeriod.ForecastStartDateParamID

Syntax

ForecastStartDateParamID: String;

Description

The ForecastStartDateParamId property determines the identifier of the parameter, setting the start date of the forecast period.

Comments

Property value can be changed if ILanerTransformPeriod.PeriodSet has the LnTransformPeriodSet.ForecastStartDate or LnTransformPeriodSet.All value, that is why ILanerTransformPeriod.PeriodSet should be set before ForecastStartDateParamID.

If the property value is not set, the forecast period start date is determined by the ILanerTransformPeriod.ForecastStartDate property.

If the ForecastStartDateParamID and ILanerTransformPeriod.ForecastStartDate properties are set, forecast period start date is determined by the last set property.

Example

Executing the example requires a form with the following components: the Button component named Button1, the LanerBox component named LanerBox1, and the UiErAnalyzer component named UiErAnalyzer1. UiErAnalyzer1 is a data source for LanerBox1. A workbook of the time series database that contains a calculated data series that is the first in the data table should be loaded to UiErAnalyzer1.

Add links to the Cubes, Dal and Transform system assemblies.

Sub UserProc;
Var
    Eax: IEaxAnalyzer;
    ParamsProv: ITsParamProvider;
    mParams: ITsModelParams;
    tParam: ITsModelParam;
    ParamVals: ITsModelParamValues;
    pVal: ITsModelParamValue;
    Laner: ILaner;
    CalcSerie: ILanerCalculateSerie;
    TransfPeriod: ILanerTransformPeriod;
Begin
    // Get workbook
    Eax := UiErAnalyzer1.ErAnalyzer;
    // Get an object used to work with parameters
    ParamsProv := Eax.ParamProvider As ITsParamProvider;
    // Get collection of parameters    
    mParams := ParamsProv.Params;
    // Clear collection of parameters
    mParams.Clear;
    // Create new parameters and set their type
    tParam := mParams.Add;
    tParam.ParamType := TsParamType.Date;
    tParam.DataType := DbDataType.DateTime;
    tParam.Id := "IDENT_START";
    tParam.Name := "Sample start";
    tParam := mParams.Add;
    tParam.ParamType := TsParamType.Date;
    tParam.DataType := DbDataType.DateTime;
    tParam.Id := "FORECAST_START";
    tParam.Name := "Forecast start";
    tParam := mParams.Add;
    tParam.ParamType := TsParamType.Date;
    tParam.DataType := DbDataType.DateTime;
    tParam.Id := "FORECAST_END";
    tParam.Name := "Forecast end";
    // Set parameter values
    ParamVals := ParamsProv.ParamValues;
    // Sample start
    pVal := ParamVals.FindById("IDENT_START");
    pVal.Value := "01.01.1995";
    // Forecast start
    pVal := ParamVals.FindById("FORECAST_START");
    pVal.Value := "01.01.2007";
    // Forecast end
    pVal := ParamVals.FindById("FORECAST_END");
    pVal.Value := "01.01.2015";
    // Use object for working with time series
    Laner := Eax.Laner;
    Laner.BeginUpdate;
    // Get a calculated series
    CalcSerie := Laner.Series.Item(0As ILanerCalculateSerie;
    // Get series calculation parameters
    TransfPeriod := CalcSerie.TransformPeriod;
    // Set used period calculation borders
    TransfPeriod.AutoPeriod := TransformModelAutoPeriodOptions.None;
    TransfPeriod.PeriodSet := LnTransformPeriodSet.All;
    // Specify parameters to determine series calculation borders
    TransfPeriod.StartDateParamId := "IDENT_START";
    TransfPeriod.ForecastStartDateParamID := "FORECAST_START";
    TransfPeriod.EndDateParamId := "FORECAST_END";
    // Refresh parametric values in a workbook
    Laner.Refresh;
    Laner.EndUpdate;
End Sub

After executing the example the workbook contains parameters that determine calculated series calculation period. Values are set for these parameters, and they were used to calculate the first calculated series in the data table.

See also:

ILanerTransformPeriod