Show contents 

Express > Express Assembly Interfaces > IEaxAnalyzeCore > IEaxAnalyzeCore.SaveCubeToStream

IEaxAnalyzeCore.SaveCubeToStream

Syntax

SaveToStream(Stream: IIOStream; [DimSelectionSet: IDimSelectionSet = Null]);

Parameters

Stream. The stream, to which the express report is saved

DimSelectionSet. Selection of dimension elements in the saved report.

Description

The SaveCubeToStream method saves data of selected express report dimensions to a stream as a cube.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier.

Sub UserProc;
Var
    Fs: IFileStream;
    DimSelSet: IDimSelectionSet;
    Context: IUiCommandExecutionContext;
    CommandTarget: IUiCommandTarget;
    mb: IMetabase;
    Expr: IEaxAnalyzer;
Begin
    CommandTarget := WinApplication.Instance.GetPluginTarget("EXPRESS_REPORT");
    Context := CommandTarget.CreateExecutionContext;
    mb := MetabaseClass.Active;
    Expr := mb.ItemById("EXPRESS_REPORT").Bind As IEaxAnalyzer;
    Context.Data := Expr As Variant;
    DimSelSet := CommandTarget.Execute("DimSelectionSetup", Context);
    If (DimSelSet <> NullThen
        Fs := New FileStream.Create("C:\EXPRESS_REPORT_C.p5c", FileOpenMode.Create, FileShare.Exclusive);
        Expr.SaveToStream(Fs, DimSelSet);
    End If;
End Sub UserProc;

After executing the example the express report is saved to the stream that is the C:\EXPRESS_REPORT_C.p5c file as a cube. Report selection is set using the Express service option command.

See also:

IEaxAnalyzeCore