So you want to group on the hour, and show the number of members who have logged into any event before or during this hour (ActivityTypeID=5 ?) and may or may not have logged out (ActivityTypeID=6 ?) of this same event.
Create a SELECT query that returns the aggregate for each login hour:
SELECT COUNT(*), t.Event, DATEADD(hh, DATEDIFF(hh, 0, getdate()), 0) AS DateTime_Hour
FROM mytable t
WHERE t.ActivityTypeID = 5
GROUP BY t.Event, DATEADD(hh, DATEDIFF(hh, 0, t.DateTime), 0)
To include the unended sessions from previous hours, add a NOT EXISTS subquery to the WHERE clause:
WHERE t.ActivityTypeID = 5 AND NOT EXISTS
(SELECT x.* FROM mytable x
WHERE x.Event = t.Event AND x.MemberID = t.MemberID AND x.ActivityTypeID = 6
AND DATEADD(hh, DATEDIFF(hh, 0, x.DateTime), 0) < DATEADD(hh, DATEDIFF(hh, 0, t.DateTime), 0))
You'll have to work on that a little more to add up the counts of unended session attendance from previous hours, so I guess a temp table is in order. This will also make it easier to do the cross-tab.
Another approach would be to fill a temp table with the hours, so you can update the temp table more easily.
In SQL 2005, there is plenty of new syntax that will cover this type of requirement much better.