Number to Word

Stimulsoft Reports.NET discussion
Saro
Posts: 7
Joined: Wed Feb 18, 2009 7:28 am
Location: India

Number to Word

Post by Saro »

Hi,

I have a situation where in I have to convert the number into words.

For ex:
1364 should be converted to " one three six four "

Is there a way to do this?

Thank you,
Saro
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Number to Word

Post by Edward »

Hi Saro,

Please use ToWords() and ToCurrencyWords() functions, which are available in the Dictionary Tab in 'Strings' group of functions inside of the designer.

Thank you.
Saro
Posts: 7
Joined: Wed Feb 18, 2009 7:28 am
Location: India

Number to Word

Post by Saro »

Hi Edward,

I am using version 2006.4 and I can not find 'Strings' group in Dictionary Tab. I guess this option is not available in this version, or do I need to workaround to get this group added to the Dictionary?

Thank You.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Number to Word

Post by Edward »

Hi Saro,

Please use the following expression in the 2006.4 version:

Code: Select all

{Func.En.CurrToStr(myCurrencyvalue)}
Thank you.
mihiri
Posts: 13
Joined: Thu Jun 12, 2008 4:43 am
Location: Manama,bahrain

Number to Word

Post by mihiri »

I am using SS 2009.1.323
I tried using ToWords and the method stated above.

my parameter is a Decimal value, so I thought ToWords (decimal value) would work.

But on both ocations(ToWords and CurrToStr) I get an error

error CS1502: The best overloaded method match for 'Stimulsoft.Report.Func.En.CurrToStr(long)' has some invalid arguments
error CS1503: Argument '1': cannot convert from 'decimal?' to 'long'

please help
Thanks in Advance

Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Number to Word

Post by Jan »

Hello,

Try following code:

Code: Select all

{ToWords(value.GetValueOrDefault())}

Thank you.
mihiri
Posts: 13
Joined: Thu Jun 12, 2008 4:43 am
Location: Manama,bahrain

Number to Word

Post by mihiri »

Thanks
But I when I use ToWords(vExcTotal.GetValueOrDefault())} I get the result, it seems to be in a language other than English.

Could you please explain what to do for that.

Regards
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Number to Word

Post by Edward »

Hi

Could you please send a mrt file with that expresion and result of rendering to support[at]stimulsoft.com for analysis, please?

Thank you.
mihiri
Posts: 13
Joined: Thu Jun 12, 2008 4:43 am
Location: Manama,bahrain

Number to Word

Post by mihiri »

Hi Edward,

I just sent it.

Thanks
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Number to Word

Post by Edward »

Hi

We have reviewed your report and will be in touch with you soon.

Thank you.
Post Reply