Jump to content
We've recently updated our Privacy Statement, available here ×

Report Section Access?


dc137654

Recommended Posts

I apologize if this is already answered in a different section but is there a simple way of controlling section visibility to certain users of a report?

 

For example, this is what I want to do:

1)In an application, a user clicks on a printer friendly page which passes the User ID as a report parameter

2)In the report, certain sections will be restricted to certain users (access is controlled in the report based on role, which is stored in our database).

 

Is this even possible?

 

Thanks in advance,

Derek

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

If the userID is coming in as a parameter, you could use it inside of the specific bands 'Print when Expression'. Remember, this has to evaluate to a Boolean expression though. It could possibly look something like:

 

new Boolean ($P{userID}.equals("value"))

 

If you need to check for multiple values, then nest another ternary expression inside of the first. Like so:

 

 

$P{userID}.equals("value1") ? Boolean.TRUE : ($P{userID}.equals("value2") ? Boolean.FALSE : ($P{userID}.equals(etc...)))

 

Remember to close your parenthesis' at the end also...

Does this help?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...