Support Portal ContactGet in touch

How to set the Culture of a SSRS Report

   Words by CRM Consultancy

   on 25/04/2016 08:30:00

imageWhen we work with SQL Reporting Services we will often use Currency Amounts and Date fields to present data back to the Report User.

By default, SSRS will assume we are working against a US Culture and so present as per the following:

SSRS Expression
=Format(Fields!Last_Month_Sales.Value,"C2")
User Experience
image

Whereas we may want our Currency presented using a UK or Euro Format.

The key here is understanding that the “C2” Formatting in SSRS is our way of reading the Designated Culture for the Report and then formatting the Number in this Culture. (“C” being Currency, and the “2” being for the number of Decimal Points)

Each Report then has a Property for the Culture we want the Report to work against.

However this Property is slightly ‘buried’ in the Properties Explorer for Visual Studio and so can sometimes be hard to find – and this can lead some developers to implement the same user experience in a manual and less effective way:

Bad SSRS Expression
="£ " + Format(Fields!Last_Month_Sales.Value,"N2")
User Experience
image

This does the job, but is not really working the way that SSRS does – and so forms more of a ‘hack’ to get the right result, rather than a more future-proof solution.

The better way of working is to find the Culture Property of our Report and set this to the intended non-US Format and then allow the inbuilt “C2” format to do the business for us.

To do this, we can:

1. Bring up the Properties Sidebar.

2. Use the Drop-down to select the ‘Report’ Option (and not the ‘Body’ option which this can default to)

image

3. Review the list of Properties and find the Property for ‘Language’

image

This will be blank initially and so defaulting to the Globalisation tag for the US, specifically ‘en-US’

We can set this value to the similar Globalisation tag for the UK (en-GB) and therefore configure our Report to render Currency Amounts and Dates accordingly.

SSRS Expression
=Format(Fields!Last_Month_Sales.Value,"C2") =Format(Fields!Last_Month_Sales.Value,"C2")
Language Setting  
en-GB fr-FR
User Experience  
image image

This then allows us to control the formatting of the entire Report from a single Setting, as opposed to applying a manual formatting for each intended Currency or Date being presented.

The above is purely a small tip for building SSRS Reports (for us, when working with SSRS to present Dynamics CRM data), but can often be missed and lead to extra manual effort on the part of the developer – so can be a handy one for ‘doing things the right way rather than the manual way’ when it comes to SSRS Development.

Further Reading

Set the Locale for a Report or Text Box (Reporting Services)

https://msdn.microsoft.com/en-us/library/ms159642.aspx

Solution Design Considerations for Multi-Lingual or Global Deployments (Reporting Services)

The above article is predominantly focused on amending an SSRS Report to work within a single designated Culture, whereas this can be expanded (both in the Report, and in the underlying configuration of SSRS) to accommodate multiple Cultures depending on the User Location – and the following MSDN Article provides more in-depth information on this:

https://msdn.microsoft.com/en-us/library/ms156493.aspx

Appendix - Country Codes

The Culture Info class specifies a unique name for each culture, based on RFC 4646 (Windows Vista and later).

The name is a combination of an ISO 639 two-letter lowercase culture code associated with a language and an ISO 3166 two-letter uppercase subculture code associated with a country or region.

Country Two Letter Code Three Letter Code Language Two Letter Lang Code Three Letter Lang Code Culture Info Code
Afghanistan AF AFG Pashto ps pus ps-AF
Afghanistan AF AFG Dari prs prs prs-AF
Albania AL ALB Albanian sq sqi sq-AL
Algeria DZ DZA Arabic ar ara ar-DZ
Argentina AR ARG Spanish es spa es-AR
Armenia AM ARM Armenian hy hye hy-AM
Australia AU AUS English en eng en-AU
Austria AT AUT German de deu de-AT
Bahrain BH BHR Arabic ar ara ar-BH
Bangladesh BD BGD Bengali bn bng bn-BD
Basque ES ESP Basque eu eus eu-ES
Belarus BY BLR Belarusian be bel be-BY
Belgium BE BEL French fr fra fr-BE
Belgium BE BEL Dutch nl nld nl-BE
Belize BZ BLZ English en eng en-BZ
Bolivarian Republic of Venezuela VE VEN Spanish es spa es-VE
Bolivia BO BOL Quechua quz qub quz-BO
Bolivia BO BOL Spanish es spa es-BO
Brazil BR BRA Portuguese pt por pt-BR
Brunei Darussalam BN BRN Malay ms msa ms-BN
Bulgaria BG BGR Bulgarian bg bul bg-BG
Cambodia KH KHM Khmer km khm km-KH
Canada CA CAN French fr fra fr-CA
Canada CA CAN English en eng en-CA
Caribbean 29 29 English en eng en-029
Catalan ES ESP Catalan ca cat ca-ES
Chile CL CHL Mapudungun arn arn arn-CL
Chile CL CHL Spanish es spa es-CL
Colombia CO COL Spanish es spa es-CO
Costa Rica CR CRI Spanish es spa es-CR
Croatia HR HRV Croatian hr hrv hr-HR
Cyrillic, Azerbaijan AZ AZE Azeri az aze az-Cyrl-AZ
Cyrillic, Bosnia and Herzegovina BA BIH Serbian sr srn sr-Cyrl-BA
Cyrillic, Bosnia and Herzegovina BA BIH Bosnian bs bsc bs-Cyrl-BA
Cyrillic, Mongolia MN MNG Mongolian mn mon mn-MN
Cyrillic, Montenegro ME MNE Serbian sr srp sr-Cyrl-ME
Cyrillic, Serbia RS SRB Serbian sr srp sr-Cyrl-RS
Cyrillic, Serbia and Montenegro (Former CS SCG Serbian ) sr srp sr-Cyrl-CS
Cyrillic, Tajikistan TJ TAJ Tajik tg tgk tg-Cyrl-TJ
Cyrillic, Uzbekistan UZ UZB Uzbek uz uzb uz-Cyrl-UZ
Czech Republic CZ CZE Czech cs ces cs-CZ
Denmark DK DNK Danish da dan da-DK
Dominican Republic DO DOM Spanish es spa es-DO
Ecuador EC ECU Quechua quz que quz-EC
Ecuador EC ECU Spanish es spa es-EC
Egypt EG EGY Arabic ar ara ar-EG
El Salvador SV SLV Spanish es spa es-SV
Estonia EE EST Estonian et est et-EE
Ethiopia ET ETH Amharic am amh am-ET
Faroe Islands FO FRO Faroese fo fao fo-FO
Finland FI FIN Finnish fi fin fi-FI
Finland FI FIN Swedish sv swe sv-FI
Finland FI FIN Sami, Northern se smg se-FI
Finland FI FIN Sami, Skolt sms sms sms-FI
Finland FI FIN Sami, Inari smn smn smn-FI
Former Yugoslav Republic of Macedonia MK MKD Macedonian mk mkd mk-MK
France FR FRA French fr fra fr-FR
France FR FRA Breton br bre br-FR
France FR FRA Occitan oc oci oc-FR
France FR FRA Corsican co cos co-FR
France FR FRA Alsatian gsw gsw gsw-FR
Galician ES ESP Galician gl glg gl-ES
Georgia GE GEO Georgian ka kat ka-GE
Germany DE DEU German de deu de-DE
Germany DE DEU Upper Sorbian hsb hsb hsb-DE
Germany DE DEU Lower Sorbian dsb dsb dsb-DE
Greece GR GRC Greek el ell el-GR
Greenland GL GRL Greenlandic kl kal kl-GL
Guatemala GT GTM K'iche qut qut qut-GT
Guatemala GT GTM Spanish es spa es-GT
Honduras HN HND Spanish es spa es-HN
Hungary HU HUN Hungarian hu hun hu-HU
Iceland IS ISL Icelandic is isl is-IS
India IN IND Hindi hi hin hi-IN
India IN IND Bengali bn bng bn-IN
India IN IND Punjabi pa pan pa-IN
India IN IND Gujarati gu guj gu-IN
India IN IND Oriya or ori or-IN
India IN IND Tamil ta tam ta-IN
India IN IND Telugu te tel te-IN
India IN IND Kannada kn kan kn-IN
India IN IND Malayalam ml mym ml-IN
India IN IND Assamese as asm as-IN
India IN IND Marathi mr mar mr-IN
India IN IND Sanskrit sa san sa-IN
India IN IND Konkani kok kok kok-IN
India IN IND English en eng en-IN
Indonesia ID IDN Indonesian id ind id-ID
Iran IR IRN Persian fa fas fa-IR
Iraq IQ IRQ Arabic ar ara ar-IQ
Ireland IE IRL Irish ga gle ga-IE
Ireland IE IRL English en eng en-IE
Islamic Republic of Pakistan PK PAK Urdu ur urd ur-PK
Israel IL ISR Hebrew he heb he-IL
Italy IT ITA Italian it ita it-IT
Jamaica JM JAM English en eng en-JM
Japan JP JPN Japanese ja jpn ja-JP
Jordan JO JOR Arabic ar ara ar-JO
Kazakhstan KZ KAZ Kazakh kk kaz kk-KZ
Kenya KE KEN Kiswahili sw swa sw-KE
Korea KR KOR Korean ko kor ko-KR
Kuwait KW KWT Arabic ar ara ar-KW
Kyrgyzstan KG KGZ Kyrgyz ky kir ky-KG
Lao P.D.R. LA LAO Lao lo lao lo-LA
Latin, Algeria DZ DZA Tamazight tzm tzm tzm-Latn-DZ
Latin, Azerbaijan AZ AZE Azeri az aze az-Latn-AZ
Latin, Bosnia and Herzegovina BA BIH Croatian hr hrb hr-BA
Latin, Bosnia and Herzegovina BA BIH Bosnian bs bsb bs-Latn-BA
Latin, Bosnia and Herzegovina BA BIH Serbian sr srs sr-Latn-BA
Latin, Canada CA CAN Inuktitut iu iku iu-Latn-CA
Latin, Montenegro ME MNE Serbian sr srp sr-Latn-ME
Latin, Nigeria NG NGA Hausa ha hau ha-Latn-NG
Latin, Serbia RS SRB Serbian sr srp sr-Latn-RS
Latin, Serbia and Montenegro (Former CS SCG Serbian ) sr srp sr-Latn-CS
Latin, Uzbekistan UZ UZB Uzbek uz uzb uz-Latn-UZ
Latvia LV LVA Latvian lv lav lv-LV
Lebanon LB LBN Arabic ar ara ar-LB
Libya LY LBY Arabic ar ara ar-LY
Liechtenstein LI LIE German de deu de-LI
Lithuania LT LTU Lithuanian lt lit lt-LT
Luxembourg LU LUX Luxembourgish lb ltz lb-LU
Luxembourg LU LUX German de deu de-LU
Luxembourg LU LUX French fr fra fr-LU
Malaysia MY MYS Malay ms msa ms-MY
Malaysia MY MYS English en eng en-MY
Maldives MV MDV Divehi dv div dv-MV
Malta MT MLT Maltese mt mlt mt-MT
Mexico MX MEX Spanish es spa es-MX
Mohawk CA CAN Mohawk moh moh moh-CA
Monaco MC MCO French fr fra fr-MC
Morocco MA MAR Arabic ar ara ar-MA
Nepal NP NPL Nepali ne nep ne-NP
Netherlands NL NLD Dutch nl nld nl-NL
Netherlands NL NLD Frisian fy fry fy-NL
New Zealand NZ NZL Maori mi mri mi-NZ
New Zealand NZ NZL English en eng en-NZ
Nicaragua NI NIC Spanish es spa es-NI
Nigeria NG NGA Yoruba yo yor yo-NG
Nigeria NG NGA Igbo ig ibo ig-NG
Norway NO NOR Norwegian, Bokmål nb nob nb-NO
Norway NO NOR Sami, Northern se sme se-NO
Norway NO NOR Norwegian, Nynorsk nn nno nn-NO
Norway NO NOR Sami, Lule smj smj smj-NO
Norway NO NOR Sami, Southern sma sma sma-NO
Oman OM OMN Arabic ar ara ar-OM
Panama PA PAN Spanish es spa es-PA
Paraguay PY PRY Spanish es spa es-PY
Peru PE PER Quechua quz qup quz-PE
Peru PE PER Spanish es spa es-PE
Philippines PH PHL Filipino fil fil fil-PH
Poland PL POL Polish pl pol pl-PL
Portugal PT PRT Portuguese pt por pt-PT
PRC CN CHN Tibetan bo bod bo-CN
PRC CN CHN Yi ii iii ii-CN
PRC CN CHN Uyghur ug uig ug-CN
Puerto Rico PR PRI Spanish es spa es-PR
Qatar QA QAT Arabic ar ara ar-QA
Republic of the Philippines PH PHL English en eng en-PH
Romania RO ROU Romanian ro ron ro-RO
Russia RU RUS Russian ru rus ru-RU
Russia RU RUS Tatar tt tat tt-RU
Russia RU RUS Bashkir ba bak ba-RU
Russia RU RUS Yakut sah sah sah-RU
Rwanda RW RWA Kinyarwanda rw kin rw-RW
Saudi Arabia SA SAU Arabic ar ara ar-SA
Senegal SN SEN Wolof wo wol wo-SN
Simplified, PRC CN CHN Chinese zh zho zh-CN
Simplified, Singapore SG SGP Chinese zh zho zh-SG
Singapore SG SGP English en eng en-SG
Slovakia SK SVK Slovak sk slk sk-SK
Slovenia SI SVN Slovenian sl slv sl-SI
South Africa ZA ZAF Setswana tn tsn tn-ZA
South Africa ZA ZAF isiXhosa xh xho xh-ZA
South Africa ZA ZAF isiZulu zu zul zu-ZA
South Africa ZA ZAF Afrikaans af afr af-ZA
South Africa ZA ZAF Sesotho sa Leboa nso nso nso-ZA
South Africa ZA ZAF English en eng en-ZA
Spain, International Sort ES ESP Spanish es spa es-ES
Sri Lanka LK LKA Sinhala si sin si-LK
Sweden SE SWE Swedish sv swe sv-SE
Sweden SE SWE Sami, Northern se smf se-SE
Sweden SE SWE Sami, Lule smj smk smj-SE
Sweden SE SWE Sami, Southern sma smb sma-SE
Switzerland CH CHE Romansh rm roh rm-CH
Switzerland CH CHE German de deu de-CH
Switzerland CH CHE Italian it ita it-CH
Switzerland CH CHE French fr fra fr-CH
Syllabics, Canada CA CAN Inuktitut iu iku iu-Cans-CA
Syria SY SYR Syriac syr syr syr-SY
Syria SY SYR Arabic ar ara ar-SY
Thailand TH THA Thai th tha th-TH
Traditional Mongolian, PRC CN CHN Mongolian mn mon mn-Mong-CN
Traditional, Hong Kong S.A.R. HK HKG Chinese zh zho zh-HK
Traditional, Macao S.A.R. MO MAC Chinese zh zho zh-MO
Traditional, Taiwan TW TWN Chinese zh zho zh-TW
Trinidad and Tobago TT TTO English en eng en-TT
Tunisia TN TUN Arabic ar ara ar-TN
Turkey TR TUR Turkish tr tur tr-TR
Turkmenistan TM TKM Turkmen tk tuk tk-TM
U.A.E. AE ARE Arabic ar ara ar-AE
Ukraine UA UKR Ukrainian uk ukr uk-UA
United Kingdom GB GBR Welsh cy cym cy-GB
United Kingdom GB GBR Scottish Gaelic gd gla gd-GB
United Kingdom GB GBR English en eng en-GB
United States US USA English en eng en-US
United States US USA Spanish es spa es-US
Uruguay UY URY Spanish es spa es-UY
Vietnam VN VNM Vietnamese vi vie vi-VN
Yemen YE YEM Arabic ar ara ar-YE
Zimbabwe ZW ZWE English en eng en-ZW

Credit here goes to Tim Trott for publishing a comprehensive list of these codes for use in .Net and SSRS:  https://timtrott.co.uk/culture-codes/

Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

CRMCS Quick Start Guide: How To Produce a Microsoft Teams Live Event Dynamics 365 Marketing: Lead Scoring and Sales Acceptance Designing and Developing Microsoft Power Apps Portals Thank You for Attending CRMCS’ Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Thank You for Attending Our Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Webinar: Discover How CRMCS Have United Dynamics 365, SharePoint and Microsoft Teams To Create Sales Excellence Ignite your workflow by adding DocDrive365 to Office 365 The CRMCS guide to everything you need to know about integrating Teams with Dynamics 365 Saving Time By Keeping Documents In One Place TDE Database Encryption with On Premise Dynamics The Key to Successful Compliance in 2020 Part 2: Let’s get GDPR Compliant with Microsoft Power Automate Top 3 Essential Tips for Remote Working Dynamics 365 Marketing: Top 5 Best Features Dynamics Day in the Life - Puma Investments Can you use Teams to amplify collaboration in Dynamics? Part 1: Using a Scheduled Power Automate to Trigger Expiry Date Reminders The secrets of successful document collaboration in Dynamics CRMCS launches new AppSource approved DocDrive365 Dynamics Day in the Life - Moneypenny Release Management Add the App to Dynamics DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Building a New Scheduled Process using Flow
  • "Paul has made a real difference to how my team of 24 people record and store valuable customer data and sales opportunities. Highly recommended."

    James, Operations Director

  • "Understanding your business allows us to advise when to implement aspects of CRM and, likewise, when not to."

    Paul McQuillan, Managing Director

  • "Dynamics 365 and CRMCS have made a real lasting difference to our business, allowing us to replace older systems that were holding back our performance."

    Grahame, Chief Operating Officer

  • "James worked well with us to help connect CRM with Outlook and relate how this might benefit our team using CRM for Property Care."

    Natalie, Property Care Supervisor

  • "Matt was really good with helping us run User Testing on the new Compliance Module of our CRM System."

    Tom, Compliance Administrator

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
Manchester
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue
London

Content © CRM Consultancy.