For Programmers: Free Programming Magazines  


Home > Archive > PowerBuilder > May 2004 > Currency Format problems









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Currency Format problems
Kris Kirk

2004-04-01, 6:41 pm

I need to display currency fields using the Windows currency symbol,
sometimes with more than 2 decimal places.

If I use [currency], then this only displays 2 decimal places.

If I use $#,##0.0000, this doesn't use the Windows currency symbol.

You would think PB would replace '$' with the appropriate currency
symbol, especially when certain formatting only works
with the '$' symbol.

For example, this works fine:

$#,##0.00;[RED]($#,##0.00)

but this does not:

Rs#,##0.00;[RED](Rs#,##0.00)

There are two problems with the latter:

1) Negative values do not show in red, instead the word 'Red' appears
next to the number!

2) Leading zero's are not suppressed despite using the '#' symbol.

Surely PB can't be this bad, am I doing something wrong?

I'm using PB 8.0.02 by the way.

Kris
Rachid CHRAÏBI

2004-05-04, 3:17 pm

Hi,

For leading zero's, try to use the format in the EditMask.

RC

"Kris Kirk" <kriskirk@hotmail.com> a écrit dans le message de
news:2ea4783f.0404011433.308ed174@posting.google.com...
> I need to display currency fields using the Windows currency symbol,
> sometimes with more than 2 decimal places.
>
> If I use [currency], then this only displays 2 decimal places.
>
> If I use $#,##0.0000, this doesn't use the Windows currency symbol.
>
> You would think PB would replace '$' with the appropriate currency
> symbol, especially when certain formatting only works
> with the '$' symbol.
>
> For example, this works fine:
>
> $#,##0.00;[RED]($#,##0.00)
>
> but this does not:
>
> Rs#,##0.00;[RED](Rs#,##0.00)
>
> There are two problems with the latter:
>
> 1) Negative values do not show in red, instead the word 'Red' appears
> next to the number!
>
> 2) Leading zero's are not suppressed despite using the '#' symbol.
>
> Surely PB can't be this bad, am I doing something wrong?
>
> I'm using PB 8.0.02 by the way.
>
> Kris



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com