How to Display the Current User’s Details in a Report
The current user’s details can be retrieved using built-in User Expressions in Bold Reports. These expressions allow you to dynamically display user-specific information such as username, email, language, and date/time formats within your reports.
This feature is particularly useful for personalized reporting, auditing, and security-based filtering, ensuring each user views data relevant to their identity. However, retrieving the Username requires an additional configuration in the Enterprise Server. Follow the steps below to enable this functionality.
Configuration Steps
-
Configure the Enterprise Server:
Add the following tag to the
reporting/config.xmlfile to enable user-based filtering by username:<UserBasedFilterType>Username</UserBasedFilterType>Path to file:
UMS site → settings → reporting/config.xml -
Retrieve Username in Report Expression:
Use the following expression in your report to retrieve the username:
=User!UserID -
Append Domain Name (if required):
To display the username with a domain prefix (for example,
abc/John), use the following expression:="abc/" & User!UserIDReplace
"abc"with your actual domain name as needed.
Other User-Based Expressions
| Expression | Output Example |
|---|---|
=User!DateFormat |
MM/dd/yyyy |
=User!Language |
en-US |
=User!TimeFormat |
hh:mm tt |
=User!UserEmail |
john@gmail.com |
=User!UserID |
john |