When developing a report that will be published to Web Reports, it may be necessary to access the current user's Role, Email Address or Username. Static User Values can be leveraged within a report's Standard Filter and Advanced Query to limit the data returned based on the authenticated user. Unlike a report's run-time parameters, Static User Values cannot be modified by the end user or through an API call. Static User Values can help improve report security by limiting the records returned, while reducing the number of reports with statically defined filters.
Web Reports Static User Values:
@WRUserName returns the user's Web Reports User Name
@WRRole returns the user's Web Reports Role
@WREmail returns the user's Web Reports Email Address
Example Use Case:
You need to develop a sales report that will display a salesperson's assigned clients. You want to leverage the Web Reports' username so the report can be filtered to show the appropriate records.
Example Standard Filter Usage:
Example Advanced Query Usage*:
*Please note that returned Static User Values do not contain single quotes. If your equivalent database field for a Static User Value is a string, you will need to add single quotes.