Decimal Separators

Jamie_Yates

Active Member
Hello All,

Our invoice currently prints out in the language of the customer. This is all done by assigning foreign words to the report constants when the customer is foreign. We also need to format the amounts differently (dot for thousand separator - comma for decimal separator) for german customers. I presumed there would be a business function to change (in cache) the way amounts are formatted, but I can't find one.

Has anybody got any idea?

Jamie

OW XE, SP 15, NT(SP6a), Oracle
 
I don't know of any BF's which would help you directly.

You could copy the values to a string variable which would appear on the report in place of the numeric value. You could then use B0400520 to swap the commas and full stops around as required.

Tim.

Xe SP17.1 NT SQL7.0<P ID="edit"><FONT SIZE=-1>Edited by TimPierce on 4/4/02 08:11 AM.</FONT></P>
 
Thanks for your help Tim.

I've copied the value to a string, but this then loses the commas (thousand separators).
Also, how do you use B9861? there are only two parameters, String and Sub-String.

Thanks

Jamie

OW XE, SP 15, NT(SP6a), Oracle
 
Hi Jamie,

When you convert the numeric to string you can use B0400410 which will bring through the decimal point but, alas, not the comma's.

To insert the commas you may have to write some event rules to count every 3rd character and insert a comma, unless you can find a BF to do it.

Once your dots and commas are in place in the string you can use B0400520 to swap them around - I know that works, I just tried it :)

You could even put all this code into a NER to save time.

Xe SP17.1 NT SQL7.0
 
Last edited:
Hello Jamie,

When running the invoice print for different customers ensure that the user ID that the job runs under has the correct user setup. For example if you require the 99,99 rather than 99.99 output then data select on all the customers which require this same format. Then run the invoice print job under a userid which has the decimal separator (xtasec/f00921 column ULDECF) set to a comma and you will get the desired effect.


Hope this works.

Andrew Holder

Xe, SP18.1, AS400 V4R5M0
 
Back
Top