ramandeep1980 Posted October 14, 2009 Share Posted October 14, 2009 Hi,How can i use LoggedInUser for getting Role of the user.Icom.jaspersoft.jasperserver.api.metadata.user.domain.UserI understand thats a SET but thenHow can i get name(string) of role in the report.Regards,RamanPost Edited by ramandeep1980 at 03/25/2010 11:03 Link to comment Share on other sites More sharing options...
malek Posted October 14, 2009 Share Posted October 14, 2009 $P{LoggedInUser}.getRoles() will return a collection of the current user roles try this:($P{LoggedInUser}.getRoles().toArray()[0]).getRoleName() will return the first role assigned to the user. Link to comment Share on other sites More sharing options...
ramandeep1980 Posted October 14, 2009 Author Share Posted October 14, 2009 Hi Malek,No it wont work that wat.I have foind the way to make it work it is below:-This will work for gettng the roleRamanPost Edited by ramandeep1980 at 03/25/2010 11:02 Link to comment Share on other sites More sharing options...
iniste Posted February 4, 2011 Share Posted February 4, 2011 Hello Where is the solution ? I'm interested by the soltion ;-)Thx Link to comment Share on other sites More sharing options...
mdahlman Posted February 4, 2011 Share Posted February 4, 2011 Did you look at this thread:http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=82399&topid=82469That's an example that does getTenantId. But you could call getRoles() at the end instead.Regards,Matt Link to comment Share on other sites More sharing options...
iniste Posted March 23, 2011 Share Posted March 23, 2011 Hi,If you have solution i need it ASAP.Thank you for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now