SaveLikeSource: Boolean;
The SaveLikeSource property determines whether the changes are saved to the calculated series source. True - save the changes to the data of the calculated series source, False - do not save the changes. The property value is considered while saving the data of all the (ILaner.SaveChangedSeries) workbook series.
Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 which is used as a data source for TabSheetBox. Workbook of the time series database must be loaded to UiErAnalyzer1. The database must include a nbsp;factor with the key 108310.
Click the button to start executing this example.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErAn: IEaxAnalyzer;
Laner: ILaner;
LanSers: ILanerSeries;
RubInst: IRubricatorInstance;
RubFact: IRubricatorFactor;
Rev: IRubricatorRevision;
CalcSer: ILanerCalculateSerie;
Begin
ErAn := UiErAnalyzer1.ErAnalyzer;
Laner := ErAn.Laner;
Laner.BeginUpdate;
LanSers := Laner.Series;
RubInst := Laner.RubricatorInstance;
RubFact := RubInst.GetFactData(108310).Factor;
Rev := RubInst.OpenRevision("New Revision");
CalcSer := LanSers.AddCalculateSerieAsSource(RubFact, Rev.Key);
CalcSer.Name := "CalculateSerieAsSource (" + CalcSer.SourceStub.Name + ")";
CalcSer.SaveLikeSource := True;
Debug.WriteLine(CalcSer.RevisionKey);
Laner.EndUpdate;
End Sub Button1OnClick;
After executing the example the calculated series ,based on the factor with a defined key, is added to the workbook. The series data changes are to be saved to the source.
See also: