IPivot.CalculateDataRights

Syntax

CalculateDataRights: Boolean;

Description

The CalculateDataRights property determines whether user access permissions to table cells will be calculated.

Comments

Available values:

The property is relevant to build table using the IPivot.ObtainTable method. If for users there is an access permissions restrictions for table cells, then on calculating access permissions, it will be available to determine operations with table cells for a specific user using the CubeDataRights enumeration.

For detailed information about user access permissions to table cells, see theDisplaying data access permissions as icons. section.

Example

Executing the example requires a form with the Button component named Button1, the TabSheetBox component named TabSheetBox1 and the UiErAnalyzer component named UiErAnalyzer1 which is a data source for TabSheetBox. An express report should be loaded to UiErAnalyzer1. The user must get read-only permissions to the first table cell.

Add links to the Express, Tab, Pivot, Cubes, Ui, Forms system assemblies.

The example is a handler of the OnClick event for the Button component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var 
    EaxAn: IEaxAnalyzer;
    Pivot: IPivot;
    Table: IPivotTable;
Begin
    
//Activate the component to get data access
    UiErAnalyzer1.Active:= True;
    
//Determine express report connected to the component
    EaxAn := UiErAnalyzer1.ErAnalyzer;
    Pivot := EaxAn.Pivot;
    
//Determine whether it is necessary to calculate access permissions to data
    Pivot.CalculateDataRights := True;
    
//Create a table, calculate user access permissions to cells
    Table := Pivot.ObtainTable;
    
//Check user access permissions to the first table cell
    //If user has read-only permissions, the appropriate message will be displayed
    If Table.DataRights(00) = CubeDataRights.Read Then
       WinApplication.InformationBox(
"The first table cell is read-only");
    
End If;
End Sub Button1OnClick;

After executing the example the form will display data table, the dialog box containing message about access permissions to the first table cell opens:

See also:

IPivot | IPivot.ObtainTable | CubeDataRights