benjamin.segall Posted June 12, 2018 Share Posted June 12, 2018 Hello, I am new at jaspersoft and i require some help on this complex query. So, the query i pasted below is what i have, and it prints a serial for a certain role and its privilages. It also brings back a base role serial and its description. I need to group these result sets based on the relation between the base serial and the serial of another result set. To be more clear: I would like to see the full list of privileges by roll for example if I choose IT Manager IT Manager (base role :IT Developer)List of all Privileges with Grant or DenyIT Developer (Base Role: IT Technician)Lit of all Privileges with Grant or DenyIT Technician (Base Role: Null)List of all privileges with Grant or Deny Or if I choose IT Developer I would only receive IT Developer (Base Role: IT Technician) List of all Privileges with Grant or DenyIT Technician (Base Role: Null) List of all privileges with Grant or Deny Here is my query: select b.SERIAL As Serial, b.DESCRIPTION As Role, d.DESCRIPTION As Privileges, c.ACCESS As Access, a.DESCRIPTION As Base, b.BASE_ROLE_SERIALfrom CORE.ROLE a, CORE.ROLE binner join CORE.PRIVILEGE c on b.SERIAL = c.PARENT_SERIALinner join CORE.SECURITY_EVENT d on c.SECURITY_EVENT_SERIAL = d.SERIAL where a.SERIAL = b.BASE_ROLE_SERIAL and $X{IN, b.DESCRIPTION, SelectRole} union allselect a.SERIAL As Serial, a.DESCRIPTION As Role, d.DESCRIPTION As Privileges, c.ACCESS As Access, a.DESCRIPTION As Base, a.BASE_ROLE_SERIALfrom CORE.ROLE ainner join CORE.PRIVILEGE c on a.SERIAL = c.PARENT_SERIALinner join CORE.SECURITY_EVENT d on c.SECURITY_EVENT_SERIAL = d.SERIAL where a.BASE_ROLE_SERIAL is null and $X{IN, a.DESCRIPTION, SelectRole}order by Role, Privileges Any help would be greatly appreciated Benjamin Segall 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