I'm trying to globalize MS reportviewer ...the stupid thing ignores regionalsettings (so you get US dates (mm/dd/yyyy) and US numbers (1,234.56) independent of your settings)
Dates are now under control!
Numbers are more problematic - I need to handle user preferences including:
1'234.56
1'234,56
1,234.56
1.234,56
It is easy to format a number (10000/3) in user-preference "n", and parse out the separators - but how to force these separators into a custom formatstring?
Can you specify a culture in the ToString and Parse methods of numeric types to parse and output (or convert) the right formatting? For example, if you need to convert to the local culture, use Decimal.TryParse (or float/double) with an invarant culture, then Decimal.ToString with the local culture?
I've seen several mentions of the culture approach on the web, but this doesn't seem to be the route I'm looking for - culture is stuffed full of MS presumptions ...just because a user's setup is based on a certain culture doesn't prevent that user from having made personal modifs to regional settings.
I gave up: all users will now see 1'234.56 on their reports.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.