I've racked my brain trying to figure this out. Hopefully someone can help.
What I am trying to achieve is a User report with the option of showing the Groups the Users belong to.
- Users (accepts UserID as a parameter; if UserID is empty, pulls all users)
- Groups (same parameter as above; I realize I could have used the same stored proc but this is where I am after trial and error)
- Users (main report)
- UserGroups (sub report; accepts a parameter for UserID)
- UsersWithGroups (main report w/ sub report; on the SubReport object, I've added a parameter for UserID)
The Users report works great. It pulls a single user or all users depending on the web user's selection.
The UsersWithGroups report works if the web user selects a single user to display. But when the web user selects all users, the subreport shows all groups for all users.
Protected Sub RunReport()
Dim dtUserData As New DataTable
ReportViewer1.ProcessingMode = ProcessingMode.Local
If chkShowDetail.Checked Then 'Show Group Subreport
ReportViewer1.LocalReport.ReportPath = "UserReportWithGroups.rdlc"
View Complete Post