Pages

Thursday, April 28, 2011

CRM 2011 Reporting Globalization: The missing link

Today one of our customers reported, that the Number Separators in CRM reports are the wrong ones. No matter what is configured in the users settings, the reports always use the En-Us formatting.

Taking a look at the fn_GetFormatStrings() Sql function, we suspected that the CRM Reporting Extensions were not correctly setting the User Information and thus the function was using the format configuration from the System. Using SQL Profile we took a look at the executed SQL Queries, but they correctly set the appropriate UserId.

Digging deeper into fn_GetFormatStrings() we saw, that no matter what, always “,” is returned for the NumberSeparator and “.” for DecimalSeparator. Thus suspecting that no matter what no report using this method of formatting would show the wrong separators.

Executing a Vanilla report we were proofed wrong. Those report correctly showed a “,” as DecimalSeparator.

Having eliminated the SQL queries as reason for this behavior I went for the report itself.

The Money fields in the Sales Pipeline also use the fn_GetFormatString(), but is nevertheless showing the correct format.

Looking through the report properties, I realized that Microsoft uses a lot of additional parameters in its report definitions:

image

At the beginning CRM_Currency_2 was suspicious, but it is used only in some chart formatting, in the sales pipeline.

So I opened the Sales Pipeline report as code and then I noticed a difference between the Sales Pipeline Report and our custom report, the Sales Pipeline report defined this:

image

Where the parameter is defined like this:

image

So, it takes the NumberLanguageCode from the fn_GetFormatStrings() and uses it as language in the report.

Putting this into our custom report finally resulted in the expected format.

So keep in mind that only using fn_GetFormatStrings() is not enough to properly localize your custom reports.

I have not been able to find this in the Sdk, hopefully Microsoft will document this soon.

1 comment:

  1. Wow! This could be one particular of the most useful blogs We have ever arrive across on this subject. Basically Magnificent. I am also a specialist in this topic therefore I can understand your effort
    Best CRM System

    ReplyDelete