m.imran.tariq Posted May 12, 2017 Share Posted May 12, 2017 Suppose I have a table with following report.Department A3,0002,000Department B2,00013,000Department B3,0002,000Now if I login from User A, Department A data should be displayed. Similarly I login from User B, Department B data should be displayed.What are possible options to do it? Link to comment Share on other sites More sharing options...
asimkin Posted May 12, 2017 Share Posted May 12, 2017 Hi,what you can try is to use LoggedInUsername buit-in parameter to retrieve logged in user and use it in a queryto retrieve requried records:http://community.jaspersoft.com/wiki/built-parameters-logged-userBest regards,Andrew Link to comment Share on other sites More sharing options...
m.imran.tariq Posted May 12, 2017 Author Share Posted May 12, 2017 Shouldn't I use roles instead of using username? Link to comment Share on other sites More sharing options...
asimkin Posted May 12, 2017 Share Posted May 12, 2017 Hi,it depenends on your requirements. You mentioned users in question:if I login from User A, Department A data should be displayedYou can use any of the built-in parameters per your scenario.Best regards Link to comment Share on other sites More sharing options...
elizam Posted May 12, 2017 Share Posted May 12, 2017 If you have the commercial version of jrs, and your report uses a Domain, then there's a whole description of how to do it in the secuity guide:http://community.jaspersoft.com/documentation/tibco-jasperreports-server-security-guide/v630/securing-data-domain 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