Jump to content

How to get the username of user who logged into Jasper Server?

Ankur Gupta
Go to solution Solved by fcerbell,

Recommended Posts


Please tell me if there is any method through which I can get  the user name of the user who logged into the Jasper Server,  and that name could be displayed in the report.

Is there any parameter which can be referred or any other work around to obtain the logged in user name.

Thanks in Advance!!

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution


You can create parameters in you report, with a specific name and datatype. Then these parameters will be automatically filled when the report is executed by JasperReports Server. There are about 10 such parameters. As an example, try to define a parameter in your report :

LoggedInUsername (java.lang.String), with no defaut value. Then, you can use $P{LoggedInUsername} in a text field, in a query, in a printWhenExpression, ... 



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...