IPivotTable.DataRights

Syntax

DataRights(Row: Integer; Column: Integer): CubeDataRights;

Parameters

Row. Cell row index.

Column. Cell column index.

Description

The property is read-only.

The DataRights property returns access permissions for data of the specified cell.

Example

Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for TabSheetBox. An express report should be loaded to UiErAnalyzer1.

Click the button to start executing the example.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

EaxAn: IEaxAnalyzer;

Pivot: IPivot;

Table: IPivotTable;

Col, Row: Integer;

Begin

EaxAn := UiErAnalyzer1.ErAnalyzer;

Pivot := EaxAn.Pivot;

Pivot.CalculateDataRights := True;

Table := Pivot.ObtainTable;

Table.Edit;

For Col := 0 To Table.ColumnCount - 1 Do

For Row := 0 To Table.RowCount - 1 Do

If Table.DataRights(Row, Col) = CubeDataRights.ReadWrite Then

Table.Cell(Row, Col) := Math.RandBetweenI(0, 5);

End If;

End For;

End For;

Table.Post;

Pivot.Refresh;

End Sub Button1OnClick;

After executing the example, access permissions for table data are calculated. Data in cells is changed only if there is a read and write access.

See also:

IPivotTable