• Here is my code:

    select distinct

    reportID,

    RoleID,

    stuff((select ', ' + t2.User2

    from #tbl t2

    where t2.reportID = t1.reportID and t2.RoleID = t1.RoleID

    for xml path('')),1,2,'') as List

    from #tbl t1;