|
| Inicio → WINDEV 2024 → WX19 - ChangeSeparator() and NumToString() don't work together |
| WX19 - ChangeSeparator() and NumToString() don't work together |
| Iniciado por guest, 10,dic. 2014 16:02 - 3 respuestas |
| |
| | | |
|
| |
| Publicado el 10,diciembre 2014 - 16:02 |
Hi,
For an international WB Application we have a requirement to generate formatted numbers based on local standards (South Korea, China, USA, France, Belgium, ...) depending on the context of the data (It is a single global WB web app installed on a European Windows 2008 Server).
According to the help ChangeSeparator() should be my friend in that case but NumToString doesn't take that into account. It will keep on looking to the Windows settings and discard any changes to the decimal and Thousand separator settings...
Is there a way to get this to work without having to write our own NumToString() function and developing ten times slower?
I already raised a call and added a sample project with Tech Support but this looks such a basic requirement that I would be surprised if am the only one that has already bumped into this.
So I'll be happy to take any suggestions or solutions out there!
Thanks,
Peter H. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,diciembre 2014 - 20:20 |
Hi Peter
you need 3 lines of code (as you said it IS a basic requirement) numtostring(yournumber) replace(thousand separator by yours) replace(decimal sign by yours)
all done
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 11,diciembre 2014 - 08:32 |
| Hi Peter, there's still the possibility to build your own display masks depending on language / required settings. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 11,diciembre 2014 - 08:57 |
Hi Fabrice,
Thanks... I should have found this myself... I'll overload the NumToString function to as you suggested. I just had a simple ChangeSeparator() at load time in mind but that should have been too simple, right?
<img src="/NG2013_WEB/ui/smiley/1.gif" align=absmiddle border=0 alt=":-)"> Thx again,
Peter H. |
| |
| |
| | | |
|
| | | | |
| | |
|