问题描述:

I have a report with different categories/departments let's say (Sales,Accounting,IT)

and 4 users:

  • User 1 - (Admin) see all the departments.
  • User 2 - Sales and accounting.
  • User 3 - accounting only.
  • User 4 - Sales Only.

The permission will be already stored in the database.

What I want something like that:

SELECT depname FROM dept

WHERE permission=(retriev_from_jasperserver_pro_users_role)

Is it possible?

网友答案:

You can use these built-in parameters:

WHERE my_column in $P{LoggedInUserRoles}
AND another_column = $P{LoggedInUsername}
相关阅读:
Top