Вопрос

I am trying to make some reports for MS dynamics CRM 2013 using Visual studio SQL Server Data Tools, I take the following xm from :

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" aggregate="true">
  <entity name="new_donation">
    <attribute name="createdon" alias="month" groupby="true" dategrouping="month" />
    <attribute name="new_donationid" alias="TotalNumber" aggregate="count"/>
    <attribute name="new_donationamount" alias="TotalAmount" aggregate="sum"/>
    <order alias="month" descending="false" />
    <filter type="and">
      <condition attribute="new_donationsource" operator="eq" value="100000017" />
      <condition attribute="createdon" operator="this-year" />
    </filter>
  </entity>
</fetch>

This will group by the createdon field (a datetime field), and count the new_donationid and sum the new_donationamount field.

This works fine, but it displays the month number instead of the month name, for example it display 5, but I want it to display May instead:

enter image description here

So is there any way to make it display a month name instead of the month number in the following attribute:

<attribute name="createdon" alias="month" groupby="true" dategrouping="month" />

Or any other workaround? and if I want to display it in other language like Arabic instead of English, is this possible too?

Это было полезно?

Решение

I found a solution for this issue, as following:

  • From the report data tab, expand the datasets folder, choose your data set.
  • Right click dataset and choose add calculated field.
  • In the Fields tab, enter a new field name "Month name" and press the fx button.
  • In the expression windows in the category list in the left expand common functions, choose date&time, then double click monthname function from the right list.
  • Add the field name to that function.

This do the trick, but I still don't know how to display it in Arabic instead of English.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top