[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Collapse]Report and Dashboard Server
 [Expand]Installation
  License and Distribution
 [Expand]Administrative Panel
 [Expand]Create Reports
 [Expand]Create Dashboards
 [Expand]Configuration and API
  User-Specific Functions
  Localization
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

User-Specific Functions

The Report and Dashboard Server provides the following functions that enable you to access information about the current user:

  • UserName()

    Returns the current user's name.

  • UserEmail()

    Returns the current user's email.

  • IsMemberOf(userGroupName)

    Returns true if the current user belongs to a group defined by the userGroupName parameter.

You can use these functions to make a data model return specific data subsets to different users. This restricts access to sensitive information in your database. Users cannot access and modify these functions unless they have the permissions.

However, non-privileged users can use these functions at the document level (to further filter data available to them).

Expanded Data Model Level

Apply a user-specific function to a data model query's filter string to define the users to which the query data is available.

For instance, specify the following filter string to display only orders shipped to a country that corresponds to a user's group (that is, a user from the USA group should not see orders shipped to other countries):

For this function to take an effect, the Report and Dashboard Server should contain user groups for each country listed in the [ShipCountry] data column.

Expanded Document Level

Report and Dashboard Server users can apply these functions at the document level.

Do the following to apply a user-specific function to a report's query:

  1. Select a query in the Field List and click its Edit Query button.

  2. On the invoked wizard page, create a new filter condition and select Function as a value source.

  3. Click the value placeholder and select a user-specific function.

Do the following to apply a user-specific function to a dashboard's query:

  1. Open the Data Sources screen, select a query and click its Edit Query button.

  2. Add a new filter condition and select Function as a value source.

  3. Click the value placeholder and select a user-specific function.

Is this topic helpful?​​​​​​​