|JReport Tech Tip:
Report Delivery Using Page-Level-Security
With the feature of page-level-security in version 9, you can now predefine access to report data by group, role or individual user. When end users schedule a report with page-level-security to HTML and/or DHTML format, all pages of the report will be included in the scheduled result. However users will only be able to see the data they are privileged to see based on the page-level-security setting.
Page-level-security is accomplished by four properties.
- Cascade - Specifies whether to allow the security identifiers specified by the following three properties to view the report detail panel and child groups. If true, the detail panel and/or child groups will be displayed with the group header and footer panel. If false, only the group header and footer panels will be displayed.
- Grant - Specifies access to the data based on users.
- Groups - Specifies access to the data based on groups.
- Roles - Specifies access to the data based on roles.
When the user names, group names and roles are the same as the ones in JReport Enterprise Server, once an end user logs into JReport Enterprise Server with his user name, only the corresponding data will be displayed according to the security identifiers.
For example, you need to set up a security policy to the sales report. Each account manager should only be able to see the sales data for their customers. Below are the key steps:
- Start JReport Designer, and create a report grouped by the DBField account manager's name.
- Import the users, groups and roles from JReport Enterprise Server into JReport Designer if necessary.
- In the Report Inspector, select the node that represents the group. Then, in the Security section of the Properties panel, set Cascade to true and the Grant property's value to the DBField account manager's name.
In JReport Enterprise Server, when viewing the pre-built report result, the data will only be visible to the account manager whose user name matches the DBField account manager's name.