on 03-26-2010 8:40 PM
I need to convert a number to English and to Spanish words to be displayed on the same report, side by side. ToWords function doesn't seem to accept an argument for the language. How do I accomplish this?
I am using Crystal Reports 2008. Thanks in advance for your help.
Regards,
Victor
Hi,
No, I have not received an answer to this question. Any help is greatly appreciated.
Thanks,
Victor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is by no means a great solution - having a language code parameter to ToWords would be a great solution - but you could create a function that translates from English to Spanish by more or less brute force. I would think the words returned by ToWords would be limited, so it wouldn't be particularly painful. Maybe something like (Basic Syntax):
function EN2SP (enString as string) as string
dim en() as string
dim sp() as string
dim i as number
dim xlate as string
en = Array("one", "two", "three", ... , "eleven", "twelve", ... "twenty", "thirty", ... )
sp = Array ("uno", "dos", ..., ..., ...) ' Sorry, I don't know Spanish...
xlate = enString
for i = 1 to ubound(en)
xlate = replace(xlate, en(i), sp(i))
next i
EN2SP = xlate
HTH,
Carl
I Victor, hope you solved your problem, I'm dealing with a similar situation, in my case, I need the function toWords to print in Spanish or English depending on a field value.
any help will be useful.
thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.