Restrict data to that owned by current user
Posted on 2004-09-14
I'm designing a report to be used with Counterpoint SQL, which uses a Crystal viewer. It is a commission report, so while there are 30 reps and I have added a parameter to allow the user to select which rep they want to report on, there is nothing stopping a rep from choosing a different rep in the parameter field and seeing their commissions. I am looking for a way to restrict the data returned by the report to that which is owned by the current user. Ideally, I would be able to create a formula or parameter called UserID that would be populated by the current user id. Then, I would be able to add a report restriction like DataRecord.Owner = UserID. But I don't know how to capture the current user. Any ideas?