IPrxSliceDimension.BeginUpdate

Syntax

BeginUpdate;

Description

The BeginUpdate method starts dimension update.

Comments

The method is recommended to be used on changing selection of controlling dimension to lock dependent dimension update. After applying selection by controlling dimension, unlock update of dependent dimensions.

The method is used for regular report where a data source is a cube with controlling dimensions.

The BeginUpdate method is applied with the EndUpdate method:

Example

To execute the example:

  1. Create a regular report.

  2. Add a standard cube with controlling dimensionsas a data source. One of dimensions with the Customers identifier, on which other dimensions depend.

  3. Add a slice to data area .

  4. Drag the added slice to the report sheet using Drag&Drop.

  5. Create an event handler.

  6. Add links to the Report, Dimensions system assemblies in the unit.

  7. Set update of dimensions on selection change for the OnBeforeExecuteReport event:

Public Sub OnBeforeExecuteReport(Report: IPrxReport; Var Cancel: Boolean);
Var
    DtSources: IPrxDataSources;
    Slices: IPrxSlices;
    SliceDim: IPrxSliceDimension;
Begin
    Report := PrxReport.ActiveReport;
    // Determine report data source
    DtSources := Report.DataSources;
    // Determine slice and slice dimension by identifier
    Slices := DtSources.Item(0).Slices;
    SliceDim := Slices.Item(0).LeftHeader.FindById("Customers");
    // Initialize dimension update by determined selections
    SliceDim.BeginUpdate;
    SliceDim.Selection.DeselectAll;
    SliceDim.Selection.selectelement(1True);
    SliceDim.Selection.selectelement(2True);
    SliceDim.EndUpdate;
End Sub OnBeforeExecuteReport;

In the regular report, after clicking the Update button on the Home ribbon tab the event occurs, which changes determined dimension selection and dependent dimensions are adjusted according to this selection.

See also:

IPrxSliceDimension