IPrxDataIsland.BeginDrill

Syntax

BeginDrill: IPrxDrillCellResult;

Description

The BeginDrill method enables the user to get value of a data area cell from slice's matrix with the ability to coordinate replacement. The user can also get information on cell binding to the source with multiple selection in fixed dimension.

Example

A unit used as an event handler for a regular report, should contain the following code (actions occurring after calculation of a data area of the regular report). The regular report must contain a data area built in the slice.

Public Sub OnAfterExecuteDataIsland(DataIsland: IPrxDataIsland);
Var
    pt: IPrxTable;
    t: ITabSheet;
    dcr: IPrxDrillCellResult;
    dr: ITabRange;
    i, j: integer;
    m: IMatrix;
    v: variant;
Begin
    m:= DataIsland.Slice.Matrix As IMatrix;
    pt:= DataIsland.Sheet As IPrxTable;
    t:= pt.TabSheet;
    dr:= DataIsland.DataRange;
    dcr:= DataIsland.BeginDrill;
    t.BeginUpdate;
    For i:= dr.Top To dr.Bottom Do
        For j:= dr.Left To dr.Right Do
            If Not dcr.Drill(i, j) Then
            Continue;
            End If;
            //substitute coordinate: 2 - dimension index in the source; 1 - element index in the dimension. 
            dcr.coord.Item(2) := 1;
            v:= m.Item(dcr.coord);
            t.Cell(i, j).Style.Hint := v As string;
        End For;
    End For;
    t.EndUpdate;
End Sub OnAfterExecuteDataIsland;    

Calculating data area displays a tooltip with value for the second element (index=1) of the specified dimension (index=2) for the cells that display data. The tooltip is not displayed if the second element (index=1) is not selected in the dimension.

See also:

IPrxDataIsland