IEaxWorkbook.Laner

Syntax

Laner: ILaner;

Description

The Laner property returns an object used to set up workbook.

Comments

To get the object for workbook setup, one can also use the IEaxAnalyzeCore.Laner property.

Example

Executing the example requires that the repository contains a folder with the WORKBOOKS identifier and a time series database with the TSDB identifier.

Add links to the Cubes, Express, Laner and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
    Exp: IEaxAnalyzer;
    Source: IMetabaseObjectDescriptor;
    WB: IEaxWorkbook;
    Context: ILanerContext;
    Laner: ILaner;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Set basic parameters of creating a workbook
    CrInfo := MB.CreateCreateInfo;
    CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_WORKBOOK;
    CrInfo.Id := MB.GenerateId("NEW_WORKBOOK");
    CrInfo.Name := "New workbook";
    CrInfo.Parent := MB.ItemById("WORKBOOKS");
    // Create the "Workbook" repository object
    MObj := MB.CreateObject(CrInfo).Edit;
    Exp := MObj As IEaxAnalyzer;
    WB := Exp As IEaxWorkbook;
    // Set a workbook data source 
    Source := MB.ItemById("TSDB");
    Laner := WB.Laner;
    Laner.RubricatorInstance := Source.Open(NullAs IRubricatorInstance;
    // Set up context 
    WB.UseLanerContext := True;
    Context := WB.LanerContext;
    Context.AllowExternalStubs := True;
    Context.AllowSmartHighlighting := True;
    Context.AllowSynchronization := True;
    //Save the created repository object
    MObj.Save;
End Sub UserProc;

After executing the example the WORKBOOKS folder will contain a created workbook with configured context. A time series database with the TSDB identifier will be used as a data source.

See also:

IEaxWorkbook