How to Display the Currently Logged-in Username in a Canned Report?

Hello,

We are using the open-source BI tool Helical Insight version 6.1.0.852.
How can we display the currently logged-in username in the canned report?

Thank You,
Netta.

Hello Netta,

You can display the currently logged-in username by using the following expression in a text field within the report:

com.helicalinsight.adhoc.metadata.GroovyUsersSession.getValue("${user}.name").replaceAll("’", “”)

This expression fetches the username from the current session and renders it dynamically in the report.

image

image

Note: Additionally, we can also display other session variable information such as the user’s organization name, roles, and profiles.

For user roles com.helicalinsight.adhoc.metadata.GroovyUsersSession.getValue("${role}.name").replaceAll("’", “”)

For user organization com.helicalinsight.adhoc.metadata.GroovyUsersSession.getValue("${org}.name").replaceAll("’", “”)

Thank You,
Helical Insight.