top N rows per group using fetchxml RRS feed

  • Question

  • Is there a way to get Top n rows per group using fetchxml()? Can that be achieved in SSRS via fetchxm()?
    Saturday, January 11, 2014 5:10 AM


All replies

  • Hi,

    I have not tested this inside CRM, but it works in ASP environments. Just test it to see if it works. The <Fetch> tag has a count attribute, set it to a number such as 5 or 10 to see if it works.

    Saturday, January 11, 2014 6:30 AM
  • Yes that will fetch only N records for that data set. Is there a way to get N records for each group. If not whether this can be implemented via rownumber in ssrs.
    Saturday, January 11, 2014 4:21 PM
  • I dont think you could restrict number of data rows with FetchXML. Instead you could do it in the report designer.

    Iranian Dynamics CRM Association | انجمن متخصصان ایرانی

    Monday, January 20, 2014 2:26 PM
  • Hi,

    Try this

    "<fetch mapping='logical' page= "1" count='N' distinct='true' version='1.0'>" +


    E V Krishna

    Tuesday, January 21, 2014 4:53 AM