IEaxDataAreaSlice.CalculationOptions

Fore Syntax

CalculationOptions: EaxDataAreaSliceCalculationOptions;

Fore.NET Syntax

CalculationOptions: Prognoz.Platform.Interop.Express.EaxDataAreaSliceCalculationOptions;

Description

The CalculationOptions property determines parameters of calculation of analytical data area slice elements.

Comments

To use this property verify that the IEaxDataAreaSlice.SkipEmptyValues property is set to False.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier containing table. For elements which have empty values, the sum formula must be set. Created calculated object must contain empty values.

Add links to the Express, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Slice: IEaxDataAreaSlice;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get data slice
    Slice := Express.DataArea.Slices.Item(0);
    // Replace empty values to zeros
    If Slice.SkipEmptyValues Then Slice.SkipEmptyValues := False;
    End If;
    Slice.CalculationOptions := EaxDataAreaSliceCalculationOptions.TreatNullsAsZeros;
    // Save changes
    Express.RefreshAll;
    (Express As IMetaBaseObject).Save;
End Sub UserProc;

After executing the example, empty values will be replaced to zeros for calculated element in express report.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Express;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Slice: IEaxDataAreaSlice;
Begin
    // Get repository
    MB := Params.Metabase;
    // Get express report
    Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
    // Get data slice
    Slice := Express.DataArea.Slices.Item[0];
    // Replace empty values to zeros
    If Slice.SkipEmptyValues Then Slice.SkipEmptyValues := False;
    End If;
    Slice.CalculationOptions := EaxDataAreaSliceCalculationOptions.edascoTreatNullsAsZeros;
    // Save changes
    Express.RefreshAll();
    (Express As IMetaBaseObject).Save();
End Sub;

See also:

IEaxDataAreaSlice