= AdHocSettings.CurrentUserName "Bob"; = new string[] { }; AdHocSettings.CurrentUserRoles "Sales" = new string[] { AdHocSettings.SharedWithValues "Bob", "Sales", "Bob Smith", }; "Admins", "Sam Jones" In the example above, Bob is a non-admin user who is assigned to the Sales role, therefore, any reports which are "Shared With" the "Sales" role will be accessible by Bob. Bob will only be able to share reports with the shared with values shown in the sample.
AdHocSettings.CurrentUserName = "Bob"; AdHocSettings.CurrentUserRoles = new string[] { "Sales" }; AdHocSettings.SharedWithValues = new string[] { "Bob", "Sales", "Bob Smith", "Admins", "Sam Jones" }; In the example above, Bob is a non-admin user who is assigned to the Sales role, therefore, any reports which are "Shared With" the "Sales" role will be accessible by Bob. Bob will only be able to share reports with the shared with values shown in the sample.
ReportDesignGuide6-9A.docx