Jump to content
Changes to the Jaspersoft community edition download ×

How do I get the Logged In User's Name in Jaspersoft Studio?

Go to solution Solved by fcerbell,

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

When you are using JasperSoft Studio, you dont have to use credentials to open the studio, so, there is no actually loggedin user. There is a logged in user when you are working with the server, either as a user, in the web UI or as a developper from JSS, with the repository plugin. So, there can not be a loggedin user when JSS executes a report in its preview tab.

You can add a String parameter to your report, named exactly LoggedInUsername and this parameter will be automatically populated by JasperReports Server when the user will execute it from the server from the web UI..

If you publish the report to the server and ask (from JSS) the server to execute it, the server will receive this inquiry from an authenticated connection (JSS repository plugin needs credentials), it will populate the parameter with the username configured in the JSS repository plugin. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...