Organization Security In Jaspersoft
Security implied on the report based on the organization details of the logged in user can be brought into reality through the use of parameter “’$P!{LoggedInUserAttribute_organization}’”. Here we have called this parameter in the Input control which controls the output of the report and sets security on the report as per the logged in user and his role. The following steps are performed to implement the organization level security on report:
1) Go to repository, there in folders look for input control folder. In input control select organization-> right click->edit. There in “define query” step check if the parameter “’$P!{LoggedInUserAttribute_organization}’” is present. This parameter filters the content of report as per the value in the profile attribute set for the logged in user. This parameter can be used anywhere in the query especially in the where clause of query which will help in data filtration.
E.g: Here the value we used for attribute organization = ‘Apollo hospital’ and the query being used in input control is going to filter the content of report for the organization: ‘Apollo hospital’ through the parameter:-
“’$P!{LoggedInUserAttribute_organization}’” .
2) The parameter ‘$P!{LoggedInUserAttribute_organization}’ can be called anywhere whether in report or in the query of input control as it implements the security on the report based on the value set in profile attribute of logged in user.
3) Stored procedure like below can be written in the query of input control where parameter ‘$P!{LoggedInUserAttribute_organization}’ is called :
In similar fashion you can customise the query to call the parameter as per the requirement.
Best Open Source Business Intelligence Software Helical Insight is Here
A Business Intelligence Framework
Thankyou
Nisha Sahu