IEaxAnalyzeCore.CreateDataSourceCache

Syntax

CreateDataSourceCache(Database: IMetabaseObjectDescriptor): Boolean;

Parameters

Database. Repository database, to which cached data is saved.

Description

The CreateDataSourceCache method creates a cache object of the data source of express report and returns result of its creation.

Comments

After executing the CreateDataSourceCache method, execute the IEaxAnalyzeCore.RefreshDataSourceCache method.

The method returns the result of operation on creating of cache object:

Example

Executing the example requires an express report with the Eax identifier and a form containing a button with the Button1 identifier.

Add links to the Express and Metabase system assemblies.

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

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    Desc: IMetabaseObjectDescriptor;
    Eax: IEaxAnalyzer;
Begin
    MB := MetabaseClass.Active;
    Desc := MB.ItemById(
"DB");
    Eax := MB.ItemById(
"Eax").Edit As IEaxAnalyzer;
    Eax.ClearDataSourceCache;
    Debug.WriteLine(
"Created: " + Eax.CreateDataSourceCache(Desc).ToString);
    Eax.RefreshDataSourceCache;
    Debug.WriteLine(
"If there is cache object: " + Eax.IsDataSourceCacheExist.ToString);
    Debug.WriteLine(
"Source cube name: " + Eax.DataSourceCache.Parent.Name);
End Sub Button1OnClick;

After executing the example a cache object is created for the express report source in the database with the DB identifier. The console window displays result of creating a cache object, result of checking if the cache object exists, and name of source cube.

See also:

IEaxAnalyzeCore