PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WB19]Decimal Points
[WB19]Decimal Points
Iniciado por guest, 10,sep. 2015 09:07 - 4 respuestas
Publicado el 10,septiembre 2015 - 09: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
Publicado el 10,septiembre 2015 - 15:08
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
Publicado el 10,septiembre 2015 - 21:08
Thanks Piet
Publicado el 11,septiembre 2015 - 07:06
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
Publicado el 11,septiembre 2015 - 09:39
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