Executing the example requires that the repository contains a workbook with the OBJ123 identifier which is created using the data from time series database, containing an attribute with the COUNTRY identifier. In the examples below this attribute is displayed in the workbook table. Also, the tooltip is set up for the workbook series.
Add links to the following system assemblies:
Cubes.
Express.
Laner.
Metabase (only for Fore).
Rds.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Exp: IEaxAnalyzer;
WB: ILaner;
TSDB: IRubricator;
Attr: IMetaAttributes;
WBAttr: ILanerAttributes;
Begin
MB := MetabaseClass.Active;
//Open a workbook to edit
MObj := MB.ItemById("OBJ123").Edit;
Exp := MObj As IEaxAnalyzer;
WB := Exp.Laner;
WB.BeginUpdate;
TSDB := WB.RubricatorInstance.Rubricator;
Attr := TSDB.Facts.Attributes;
WBAttr := WB.Attributes;
//Add the COUNTRY attribute to the list of displayed attributes of the workbook
WBAttr.Add(Attr.FindById("COUNTRY"));
//Set observation attribute with the DT identifier as a tooltip for series values
WB.ObservationAttributeInComment := "DT";
WB.EndUpdate;
MObj.Save;
End Sub UserProc;
After executing this example the workbook table displays the attribute with the COUNTRY identifier. The tooltip showing the date of the last series update is displayed for all series in the workbook.
The defined procedure is the Main entry point in the Program module of the .NET assembly. The Express, Metabase, Cubes, Laner, Rds assemblies must be imported to this module from the Prognoz.Platform.Interop system assembly.
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MObj: IMetabaseObject;
Exp: IEaxAnalyzer;
WB: ILaner;
TSDB: IRubricator;
Attr: IMetaAttributes;
WBAttr: ILanerAttributes;
Begin
MB := Params.Metabase;
//Open a workbook to edit
MObj := MB.ItemById["OBJ123"].Edit();
Exp := MObj As IEaxAnalyzer;
WB := Exp.Laner;
WB.BeginUpdate();
TSDB := WB.RubricatorInstance.Rubricator;
Attr := TSDB.Facts.Attributes;
WBAttr := WB.Attributes;
WBAttr.Add(Attr.FindById("COUNTRY"));
//Set observation attribute with the DT identifier as a tooltip for series values
WB.ObservationAttributeInComment := "DT";
WB.EndUpdate();
MObj.Save();
End Sub;
The result of example execution matches with that of the Fore example.
See also:
Examples | ILanerSerie | ILanerCalculateSerie | ILanerAttributes