Tech Support > Microsoft Windows > Windows CRM > Reporting using Teams
Reporting using Teams
Posted by James on March 19th, 2007


I've been trying to report on Activites using Teams to segment the Activities
and I can't seem to get the Where clause on Team to work.

If I removed the Team in the Where and filter in CRM it works fine, however
their are too many people on this team to do that.

Anything wrong with this query?

Thanks, James

SELECT CRMAF_FilteredActivityPointer.activitytypecodename AS
ActivityType, CRMAF_FilteredActivityPointer.actualendutc AS ActualEndDate,
CRMAF_FilteredActivityPointer.owneridname AS
OwnerName, CRMAF_FilteredActivityPointer.description,
CRMAF_FilteredActivityPointer.regardingobjectidnam e,
CRMAF_FilteredActivityPointer.activityid,
CRMAF_FilteredActivityPointer.subject,
CRMAF_FilteredActivityPointer.createdon,
CRMAF_FilteredTeam.name
FROM FilteredActivityPointer CRMAF_FilteredActivityPointer INNER JOIN
FilteredTeam CRMAF_FilteredTeam ON
CRMAF_FilteredActivityPointer.owningbusinessunit =
CRMAF_FilteredTeam.businessunitid
WHERE (CRMAF_FilteredTeam.name = N'team name')
ORDER BY CRMAF_FilteredActivityPointer.owneridname

Posted by Raj on March 19th, 2007


If you are trying to get the activiies by team, i don't think the following
query will work. Please try the following, it will get all the activites
along with the team name

select activityid, activitytypecode, actualendutc, owneridname,
owningbusinessunit, filteredteam.name
from filteredActivitypointer, filteredteammembership, filteredteam
where filteredactivitypointer.ownerid = filteredteammembership.systemuserid
and
filteredteammembership.teamid = filteredteam.teamid
order by filteredteam.name

Hope this helps,
Raj

"James" wrote:

Posted by James on March 19th, 2007


Thanks Raj! That worked perfect. I owe you one.

"Raj" wrote: