Monday, March 19, 2012

number in words

Hy,

I use Reporting Services with Visual Studio and in my report I have to write the numbers of my data base in words. For example : "55" has to be written "fifty five".

I have to do that in two other langages: french and dutch.

But I don't know at all how to do that. I never used reporting service before. Can you help me?

Regards

The requirement you present is not a simple one and certainly is not something that supported out of the box.

Your best option is to create a table with the range of numbers you wish translated and a language code column and get some resource to generate the translations manually.

Unless you want to get into custom coding to parse the number and translate it into words in the desired language on the fly, which although an interesting prospect I would certainly not recommend.

|||

Hello Oolon,

I had the same requirement, but I had in english. I did not create a table insted I created two functions and called one from another. First function has all the table values and the second has all the logic.

http://www.planet-source-code.com/vb/scripts/ShowCodeAsText.asp?txtCodeId=439&lngWId=5

Hope this helps.

|||

This code is perfect

Thank you

No comments:

Post a Comment