Limiting User Reports based on "Allowed" Locations

SOLVED

We have multiple users across our branch network who can run different reports but I want to be able to limit their access based on "allowed" locations.  For example, I want to limit a reorder report for a user so they can only run for their location and not the full company.

Currently I have had to make multiple versions of the same report that are locked into a fixed location but hoping to improve this.

My thought was to have an optional field created called USERLOC where I can use the user name as the VALUE and put their allowed locations within the VDESC field.

Then I use the CURRENTUSER special field in Crystal to link to the user in the optional field I made.

I just can't figure out how to link the CSOPTFH and CSOPTFD tables into my queries.  Some users may be allowed to view multiple or all locations whereas some users are only allowed a single location.

Anyone have any ideas on how to accomplish what I'm trying to do, or is there a method that I have completely missed?

Parents
  • 0

    I will be interested in hearing other answers.  My first thought is the main report is only based on the CS tables, and then it sends the parameters off to the sub-report, which is probably your main report right now.  Though this will not work if your main report already has subreports built in.  But thought I'd throw it out there.

    I'm sure there is another way, but at the moment, is all I can think of.

    Hope you have good luck on getting this solved!

  • +1 in reply to Jody Roberts
    verified answer

    I was able to make it work!

    Had to make a sub report in header to use the CSOPTFH and CSOPTFD tables.  then setup a shared variable to pass the data into the main body and then can use it as a suppression criteria.  Can't use it as a record/group selection, but that's ok.  At least this will work for what I'm trying to accomplish.

Reply
  • +1 in reply to Jody Roberts
    verified answer

    I was able to make it work!

    Had to make a sub report in header to use the CSOPTFH and CSOPTFD tables.  then setup a shared variable to pass the data into the main body and then can use it as a suppression criteria.  Can't use it as a record/group selection, but that's ok.  At least this will work for what I'm trying to accomplish.

Children