Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 2 Jahren, 9 Monaten
Letzter Beitrag:
vor 2 Jahren, 9 Monaten
Beteiligte Autoren:
Ericus, Piet van Zanten

[WB19]Decimal Points

Startbeitrag von Ericus am 10.09.2015 07:07

Hi

In my project under Number and Currrency Settings I have specified my project to use .(point) as the decimal separator.

The same applies in the regional settings on my webdev server.

So in the past where I had a string control on a looper I just update it with the value from the file and it displayed correctly i.e. 123.45 (point)

However, since moving to Windows 2012 on some screens it now displays that value as 123,45.

When updating the file again from the looper the record is updated with 123 without the decimal portion. However this happens only with some amounts not all of them. I cannot find a pattern. Some amounts are big i.e. 1 234 654,65 and others small i.e 1234.45 and some positive and some negative.

I have checked the regional settings in Windows 2012 and it is correct. Changed the language to something else and back but still the display does not follow my project settings.

Any ideas please.



Ericus Steyn

Antworten:

Hi Ericus,

It looks like Windows uses the comma as a decimal separator.
You say you display the numeric values in a string control, so without any formatting in your program Windows will return 123,45
To prevent such issues you should always display the values in a numeric control with a proper display mask.
So change the controls were you find these problems to numeric and apply a display mask.

Regards,
Piet

von Piet van Zanten - am 10.09.2015 13:08
Thanks Piet

von Ericus - am 10.09.2015 19:08

Re: [WB19]Decimal Points [SOLUTION]

Ha I found the solution eventually.

Have a look here:

https://twenty57.zendesk.com/entries/25566633-Regional-Settings-on-Windows-Server-2012-Windows-8-environment

or in summary do this:

Regional Settings :
1.Go to Region and Language settings in Control Panel
2.Change format to English (South Africa), short date = yyyy/MM/dd
3.Click on Additional Settings. Make sure that the Number and Currency decimal symbol is dot (.). Click OK
4.Go to Administrative tab. Click on Copy Settings. Check both the checkboxes in the tab
5.Click OK and exit the settings

IIS Settings : For some reason, updates to Regional Settings aren't pushed to existing Application Pool Identities, even when you've selected to push the changes to System Accounts and new users. You have to create a new App Pool.
1. Create a New App Pool and associate this new App Pool with the Stadium Virtual Directory

2.Delete the original App Pool

von Ericus - am 11.09.2015 05:06

Re: [WB19]Decimal Points [SOLUTION]

Hi Ericus,

In this case, where you are only dealing with your own server, that is a solution.
But for Windev, where you don't control regional settings for the enduser computer it is not.
So I would recommend to make it a habit to always use numeric controls to display numeric data.
I still think that even in your case you will not get a consistent number of decimals for decimal numbers, as without any formatting 12.00 will display 12, 12.30 will display 12.3, 12,34 will display 12,34

Regards,
Piet

von Piet van Zanten - am 11.09.2015 07:39
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.