Suppose I have a table with following report.
Department A | 3,000 | 2,000 |
Department B | 2,000 | 13,000 |
Department B | 3,000 | 2,000 |
Now 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?
1 Answer:
Posted on May 12, 2017 at 9:55am
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...
Hi,
what you can try is to use LoggedInUsername buit-in parameter to retrieve logged in user and use it in a query
to retrieve requried records:
http://community.jaspersoft.com/wiki/built-parameters-logged-user
Best regards,
Andrew
Shouldn't I use roles instead of using username?
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