DataRights(Row: Integer; Column: Integer): CubeDataRights;
Row is an index of a cell row.
Column is an index of a cell column.
This property is read only.
The DataRights property returns access rights for data of the given cell.
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 the UiErAnalyzer1.
Clicking the button initiates example execution.
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 this example, access rights for table data is calculated. Data in cells is changed, if there is an access to its reading and changing.
See also: