Last post Aug 28, 2016 09:29 AM by Chris Zhao
Aug 17, 2016 08:20 PM|BorisPazin|LINK
We have reports which should be used by users from different cultures. Some reports include dates. The problem is that date format is not same in different cultures.
So, for example short date in English should display as 8/17/2016 while short date in Croatian should be 17.8.2016 etc.
Does anybody know how to set current culture to report when using ReportViewer control?
I see there is rs:ParameterLanguage, but I don't know how to set it to ReportViewer?
What is recommended way to resolve different formats of number and dates?
Aug 18, 2016 09:39 AM|Chris Zhao|LINK
Take a look at Set the Locale for a Report or Text Box (Reporting Services). Using the built-in field User!Language in an expression for the Language property of a report or a text box
Aug 18, 2016 10:20 AM|BorisPazin|LINK
Thank you for your answer.
Unfortunately, the article doesn't explain how to set Language property for the report when using ReportViewer control.
I know it can be done when using URL approach, but we are creating ASP.NET web application and must use ReportViewer control.
So, my question is how to set culture, or language when showing report in ReportViewer?
ReportViewer control doesn't have Language property. ReportViewer.ServerReport also doesn't have Language property.
Aug 28, 2016 09:29 AM|Chris Zhao|LINK
1. Setup a report parameter that represents the culture code you want to display.
2. Set the Language of your report to the value of the parameter.
3. Make sure to put a date or currency format on fields that you localize.