ILanerDerivedSerie.CreateFactor

Syntax

CreateFactor([SaveOptions: LnSaveOptions= 255]): IRubricatorFactor;

Parameters

SaveOptions. An optional parameter that indicates the changes to be saved.

Description

The CreateFactor method creates a factor based on a calculated series.

Example

To execute the example, place on the form the Button component named Button1, the LanerBox component named LanerBox1, and the UiErAnalyzer component named UiErAnalyzer1. Specify UiErAnalyzer1 in the Object property as a data source for LanerBox1. A data source for UiErAnalyzer1 is the workbook specified in the Object property. Besides, set the Active property to True for UiErAnalyzer1. The workbook should contain a working area of the time series database with child series. Before executing the example set values of all child series mandatory attributes.

Add links to the Cubes, Express, ExtCtrls, Forms, Laner, and Rds system assemblies.

The example is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ErAn: IEaxAnalyzer;
    Laner: ILaner;
    LanerSers: ILanerSeries;
    Serie: ILanerSerie;
    j: Integer;
    DerivedSerie: ILanerDerivedSerie;
    Factor: IRubricatorFactor;
Begin
    ErAn := UiErAnalyzer1.ErAnalyzer;
    Laner := ErAn.Laner;
    Laner.BeginUpdate;
    LanerSers := Laner.Series;
    For j := 0 To Laner.SeriesList.Count - 1 Do
        Serie := Laner.SeriesList.Item(j);
        If Serie.Kind = LnSerieKind.Derived Then
            DerivedSerie := Serie As ILanerDerivedSerie;
            Factor := DerivedSerie.CreateFactor(LnSaveOptions.Name);
            LanerSers.AddCalculateSerieAsSource(Factor);
        End If;
    End For;
    Laner.EndUpdate;
End Sub Button1OnClick;

After executing the example, indicators are created on the basis of child series of a calculated series. The series, based on these factors, are added to the data table.

See also:

ILanerDerivedSerie