The only attributes which you can select in the grid are the attributes which are belonging to the entity activitypointer. These include the activityid, startdate, statecode, but also the regardingobjectid. So the question is, how to get the to, from, cc etc. For this you can use the function which I have posted in my previous post. This function accepts an ActivityID and an ActivityPartyType. So what is this type? Look at this page: ActivityPartyType. You will find a list of values mapped to what kind of field you want to add to your report.
By using that function you can create your query for the report. An example would be:
SELECT
activityid, activitytypecode, scheduledstart, subject, owneridname, statecodename,
regardingobjectidname,
(SELECT DBO.fn_PGGM_GetActivityPartyList(activityid, 1)) [to],
(SELECT DBO.fn_PGGM_GetActivityPartyList(activityid, 2)) [from],
(SELECT DBO.fn_PGGM_GetActivityPartyList(activityid, 5)) [required]
FROM
filteredactivitypointer
This query does select some default attributes and it adds the regarding, to, from and required fields. Add this query to the generation of a report and you'll be set to go.
Note: make sure that the function gets added to your database and assign the correct rights. See the post around the function for details.
Happy reporting!
I have been trying to finalize a CRM 4.0 report for the last 2 months, and I am stuck on an issue where I cannot use a Count function the way I want, (Namely =Count(Fields!blahblah.Value, "1"). I am going out on a desperate hope that you could possibly help me.
ReplyDeleteThanks,
Zac
Hi Zac,
ReplyDeleteHave you thought about using the count statement in your SQL query already? That might solve your issue.
Hope this helps,
Ronald
I figured it(30 hours of work later). Count(IIF(Fields!new_card.Value = "-1", 1, Nothing))
ReplyDeleteThanks for your quick response though.
Zac