当前位置: 动力学知识库 > 问答 > 编程问答 >

jasperserver - JasperReports Server Pro 4.5 / JasperReports 4.5 assign roles to specific part of the report

问题描述:

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}
分享给朋友:
您可能感兴趣的文章:
随机阅读: