Numerical Field Formatting

AnthonyMillard1

New Member
Hello all and hope you can help

I work on an existing Progress 91C application which has 1,000's of viewers; most with numerical fields which by application formats into the currency format of the users choice.

All decimal fields are defined at zz,zzz,zzz,zz9.99, but before the fields are populated the viewer looks up the currency definition that the customer wants and reformats the field to their settings;
therefore it may be displayed as
STR-zz,zzz,zzz,zz9.99
(USDzz,zzz,zzz,zz9.99)
£zz,zzz,zzz,zz9.99-
etc..

However, we have hit a major issue with a new installation in New Zealand and they want to use the currency abbreviation of
NZD; and have it appear before the value so the resulting numerical formatting is
NZD-zz,zzz,zzz,zz9.99
With this; when display any values Progress returns an error of

"Character number 3 of format NZD-zz,zzz,zzz,zz9.99 is invalid. (22)"

Which I suspect is the Z of NZD confusing Progress to think its the start of the numerical format and therefore raises an error on the D.

I know Z and z are not allowed in the Trailing and Leading string text; but I am left with how can I solve the issue.

Does anyone know of any way into tricking the system to ignore the first Z if its clearly part of the leading test and not the number formatting.

As NZD is the ISO standard for currency abbreviation for New Zealand Dollars they are unwilling to use anything else.

Thanks in advance
Anthony Millard
 
Hi,

I tried this myself too. I cannot define a format like you did for a number.
But i got the same error with the NZD when i tried to add some leading string.
I added a print screen with the error message to this reply.
The message says the letter 'Z' is not allowed in a leading string .. like you thought..
At this time i don't know how to solve this.. but it guess something must work..
i'll try and find it.



regards,



Elise
 

Attachments

  • error.jpg
    error.jpg
    26.3 KB · Views: 15
Re: Numerical Field Formatting - Possible Solution

I have had some success with this.

The font we were using for all the application was
MS Sans Serif, size=8,bold

I switched this to be
Microsoft Sans Serif, size=8,bold Script=greek

which looks almost identical, but has an additional character called
U+0396 (0xC6): Greek Capital Letter Zeta
which maps to Progress CHR(0198)

This character looks the same as a normal Z but does not get recognised as the formatting character Z, and therefore problem solved.
My application is now happily accepting NÆDzz,zzz,zzz,zz9.99
although in the new font looks like NZD.

Just need to cycle test and ensure that this new font functions correctly in the system, and if so a successful solution.

Thanks all that helps

Anthony Millard
 
great..
Hope it solves your problem..
if you have some tome accidentally.. maybe you could take a look at my thread in this forum?

thanks a lot in advance

best regards,

Elise
 
Back
Top