1

I have a SharePoint page contains a page viewer web part , I looking for displaying a report according to the login user group.

EX: the login user belongs to HR SharePoint Group , I want to detects its group and change the Report URL in Report Viewer Web Part according to its group name.

Any help would be appreciated

2

This depends greatly on allowed technologies and your experience level. This is quite easily done in javascript using CSOM or REST endpoints to check the users group, but would assume only the first group it finds that the user is in. Meaning it would be useful only if the user were in one group and no others.

Another option would be using audience targeting on the webparts, but you would have all the reports on the page in their own webparts and show/hide using audience targeting. Not ideal but would work. Again assumes users only in 1 group or they get more reports.

The better option IMHO would be to have these reports on separate pages and set permissions on those pages. Then the user can select what reports they want to run from only the pages they can see.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.