Fetch-Xml based report (to count User Access in the last 6 months ) for Microsoft Dynamics CRM Online RRS feed

  • Question

  • Hi,

    I have created a User Access report for CRM on-premise using SQl query in the following format. One row corresponds to one user in organization. Currently, I am using Microsoft Dynamics CRM Online trial version and have two users in my organization.

    I want to the same report for CRM Online environment. Only Fetch-Xml based custom reports are supported by CRM online environment hence this SQL query cannot be used.

    I have already written fetch-xml query to retrieve user access records ("audit" entity records) in "last-x-months" (where x = 1,2,3,4,5,6) as below.

    I am able to retrieve the records with "last-x-months" condition at a time, for example, the last-2-months  in my fetch-xml query only.

    For, example, when I retrieve the records in the last-2-months, it also includes the records in the last month. I want to count the records in the 2nd month only that is the difference between these two. The difference will be my 2nd column.

    Similarly, I want the other columns.  

    For the case in the above example, I have created the two separate datasets to get the record-count for the last month and last-2-months. But, I am not able to use the two datasets in the same table in my report and hence not able to calculate the difference.

    Is there any way to solve this problem?

    Thursday, March 26, 2015 2:30 PM


  • Hi,
    I have modified my Fetch-XML query to retrieve all the required User Access records and removed aggregation and counting and grouping from the query as well. Did grouping and counting in SSRS. Now the report works fine as shown in the above picture.
    • Marked as answer by P H S Monday, March 30, 2015 6:17 AM
    Monday, March 30, 2015 6:17 AM