Hide columns or Rows in a report based on Globals parameter UserID

  • Bascially what I want to do is either hide a row from my report from particular user ID's, or I could just turn the font white so they can't read it. When I try to add the following conditional format to the test color it doesn't work

    -IIF(Globals.UserID = "JOHN DOE", "White", "Black")

    It highlights Globals.UserID as an unknown property name...if there is a better way to hide information from specified users I'm open to any ideas. The way our system is set up for the SQL report server everyone has admin privledges so I can not restrict access to the reports, so I'm hoping I can restrict user access to data within the report.

  • First, there is no Gglobals.USerid. The parameter I believe you are lookign for is User!UserID="John Doe"

    Secondly, I'd hide this information using the column's visibility property. You can use an expression just like with the colors. I like this because even if you do the color thing, they can probably just select the region and have it show up, or export it to excel and see the data.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Thanks that worked perfect. Only issue is the nice message that pops up on the report server saying:

    "The Hidden expression used in table ‘table1’ returned a data type that is not valid."

    Thats a nice way to clue them into where to look to give them access again! Any way you know of to not send that error message?

  • Make sure you are returning the value True or False not the string "True" or "False" in your expression (or the other way round I forget which one it wants). At least I think that's your issue without seeing the actual code you are using.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Thanks works great now....I was passing it the string "True" rather than the boolean value as you suspected.

  • Glad that worked for you

    Cheers,

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply