SSRS reports for activity feeds
Usually I prefer to create my SSRS reports based on SQL datasets. But sometimes there are situations, where this is not possible and you have to go for datasets based on FetchXML.Now I faced such a situation, since I have been asked to generate a report displaying the latest post date (and additional other details) of each account.
But for the "post" entity no FilteredView exists:
The post entity contains the following attributes:
So on the one hand a post can be directly linked to an account via the regardingobjectid field.
But what about posts about an appointment or opportunity regarding an account. Here the "postrole" entity comes into place.
The postrole entity contains references to all entities that are related to one post, e.g. in case of a post regarding an opportunity there could be references to the systemuser, the opportunity and the account/contact:
So in case you want to retrieve all accounts and the latest update date of all posts regarding that accounts, you could use the following FetchXML statement:
This statement only returns the accountid and the lastupdate date. So in case you have to add additional information, you need to extend it.
In my case I had to provide other details like account name, manager, last meeting, next meeting, a.s.o. So I created a second dataset (based on SQL) and linked the datasets in a table via a lookup.
Hope this helps ;)
Thomas
Comments
Post a Comment