I wrote the following query to build a basic data set using a common table expression and then a grouping/concatenation operation to get the results I think you're looking for:
WITH temp AS (
SELECT CAST('1/1/2009' AS DATETIME) AS Date, 'Training 1' AS Session, 'Mike' AS Participant
UNION ALL
SELECT CAST('1/1/2009' AS DATETIME) AS Date, 'Training 1' AS Session, 'Bill' AS Participant
UNION ALL
SELECT CAST('1/1/2009' AS DATETIME) AS Date, 'Training 1' AS Session, 'Steve' AS Participant
UNION ALL
SELECT CAST('1/2/2009' AS DATETIME) AS Date, 'Training 2' AS Session, 'Steve' AS Participant
UNION ALL
SELECT CAST('1/2/2009' AS DATETIME) AS Date, 'Training 2' AS Session, 'Bill' AS Participant
UNION ALL
SELECT CAST('1/3/2009' AS DATETIME) AS Date, 'Training 3' AS Session, 'Mike' AS Participant
)
SELECT DISTINCT
Date,
Session,
(
SELECT STUFF(
(
SELECT
',' + CAST(Participant AS NVARCHAR(50)) + '' AS [text()]
FROM
temp b
WHERE
b.Date = a.Date AND
b.Session = a.Session
FOR
XML PATH('')
),
1,
1,
''
)
) AS Participants
FROM
temp a
This outputs the following:
Date Session Participants
2009-01-01 00:00:00.000 Training 1 Mike,Bill,Steve
2009-01-02 00:00:00.000 Training 2 Steve,Bill
2009-01-03 00:00:00.000 Training 3 Mike
You can format these results however you want in SSRS. No promises that this will run fast on a very large dataset due to the DISTINCT clause, but any grouping operation you do on a large dataset would be slow anyway. Using the FOR XML clause like this absolutely rules when it comes to concatenation.
Hope this helps.