0
votes

I've converted an SSRS report from SQL to FETCHXML that was used by on-premises CRM 2011.

Now the report is using CRM 2013 as the data source.

In the old version of this report we had this expression:

=String.Format(New System.Globalization.CultureInfo(1033), chrw(123)&"0"&chrw(125)&" "&chrw(40)&"Count"&chrw(58)&" "&chrw(123)&"1"&chrw(125)&chrw(41), IIf(IsNothing(Fields!stepname.Value), "Not specified", Fields!stepname.Value), CInt(Count("")).ToString(First(Fields!NumberFormat_0_Precision.Value, "DSNumberAndCurrencyInfo"), Code.GetCultureInfo()))

The following will return the number of rows in the current group; however, when connecting to a CRM online instance (FetchXML), this will not work:

CInt(Count("") 

How can this be accomplished through an expression that is compatible with a FetchXML report?

1

1 Answers

1
votes

In your FetchXML can't you use the aggregate ='count' with some alias and then use the alias value in your expression?

The article here has a report example that uses FetchXml with counts.

aggregate = 'true' -- This indicates that we are going to use an aggregate function in the fetchxml.

aggregate ='count' -- Here we need the aggregate function count. Because we need count of 'your entity you are wanting to count'.

groupby='true' -- Group by 'your entity you are wanting to count'. And its based on count.