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 or any other way to deal with the issue.
Thanks in Advance!!
Try declaring a parameter with the name "LoggedInUsername" (this exact name, since it is reserverd by jasper to hold the username of the logged user).
and use it like
$P{LoggedInUsername}
.Note: this will only work on the server, not in iReport.
Open report in iReport and create a parameter with name "LoggedInUser" and class "com.jaspersoft.jasperserver.api.metadata.user.domain.User", otherwise you can copy the below XML line in XML of the report where all parameters are listed.
Then add a text field and then you can refer to this parameter, like:
or