-
Notifications
You must be signed in to change notification settings - Fork 25
Sample Report: Counting Users In Each Role
Tom edited this page Mar 4, 2016
·
1 revision
The sample report in this short tutorial lists the number of users in each role of the site. It is based on using a new instance of Reports and accepting all defaults for other fields.
- Go to a Reports module.
- Select Manage > Settings from the module actions menu.
- Go to the Data Source Settings section of the Report Settings tab.
- In the Title text box, enter
Users In Roles
. - In the Description text box, enter
The number of users in each role in the site.
- At Active Data Source, select DotNetNuke Data Source.
- In the Query text box, enter the query below:
SELECT R.RoleName, COUNT(UR.UserID) AS 'UsersInRole'
FROM {oQ}UserRoles AS UR
INNER JOIN {oQ}Roles AS R ON UR.RoleID = R.RoleID
WHERE PortalID = @PortalID
GROUP BY R.RoleName
- Go to the Display and Caching Settings section and mark the Show Info Pane and Auto Run Report check boxes.
- Click the Update button.
Sample Report: Counting Users In Each Role