IPrxTableDataBinding.AttachRange

Syntax

AttachRange(TabRange: ITabRange; Slice: IPrxSlice; Selection: IDimSelectionSet): Boolean;

Parameters

TabRange - range of sheet cells.

Slice - data source slice.

Selection: slice selection.

Description

The AttachRange method binds a range of cells to a data slice. The number of selected elements in the slice must correspond with the range size. The method returns True when completed successfully or False when failed.

When the sheet is calculated, the binding is reset.

Example

The following example assumes that there is the Report object with the IPrxReport type.

Sub UserProc;

Var

Report: IPrxReport;

SheetT : IPrxTable;

Slice : IPrxSlice;

DataS : IPrxDataSource;

Sel : IDimSelectionSet;

Range : ITabRange;

Result : boolean;

Begin

DataS := Report.DataSources.Item(0);

Slice := DataS.Slices.Item(0);

sel := Slice.Selection;

SheetT := Report.Sheets.Item(0) As IPrxTable;

Range := SheetT.TabSheet.Cells(0, 0, 3, 2);

Result := SheetT.DataBinding.AttachRange(Range, Slice, Sel);

If Result Then

WinApplication.InformationBox("Binding performed");

Else

WinApplication.InformationBox("Binding failed");

End If;

End Sub UserProc;

After executing the example an appropriate message is displayed depending on the result.

See also:

IPrxTableDataBinding