Applying a connection-scope security policy to a report

To apply a connection-scope security policy to a report, follow the steps below:

  1. In JReport Designer, open the report to which you want to apply the security policy.
  2. In the Report Inspector, select the node that represents the dataset the report uses in the Datasets node.
  3. In the Security section of the Properties panel, select a required security policy for the Security Policy Name property.
  4. Preview the report and the Security Identifier dialog will pop up.
  5. Type the user SID, then click OK to see the result. You will not be able to view any records if the user SID you enter doesn't exist in the defined security policy.

After you have applied a connection-scope security policy for a report in JReport Designer, you can then publish it to JReport Server as normal. Then when you log onto JReport Server as different users, you will find that the security settings have been applied to the report. That is, different users will only see the data they are supposed to see. However, as the user defined users and roles in a connection-scope security policy may not be recognized by JReport Server, if your security policy contains such users/roles, you need to first create these users and roles respectively on JReport Server, and then in JReport Designer, synchronize the security information with the server by means of importing security information from the sever with the Merge option checked.

Notes: