Jul 10, 2006 #1 jorgis Programmer Jun 26, 2005 3 BE Hey, I work with Crystal 8.0 and I have to convert a numbre to text. eg : Total amount = 520,20 € --> result must be : five two zero komma two zero is this possible? thanks for helping me ! jm
Hey, I work with Crystal 8.0 and I have to convert a numbre to text. eg : Total amount = 520,20 € --> result must be : five two zero komma two zero is this possible? thanks for helping me ! jm
Jul 10, 2006 #2 josearturoramirez Programmer Jul 7, 2006 11 US Is posible, just create an function array/case that read the expression, Something like Expression i; NumberVar n; Len(1,000.00) = n; for n = 1 to n select case (NUM CHARACTER) case "1" Expression := Expression & " ONE " etc..... Upvote 0 Downvote
Is posible, just create an function array/case that read the expression, Something like Expression i; NumberVar n; Len(1,000.00) = n; for n = 1 to n select case (NUM CHARACTER) case "1" Expression := Expression & " ONE " etc.....
Jul 10, 2006 #3 synapsevampire Programmer Mar 23, 2002 20,180 US Well the comma is the tricky part. A formula such as: whileprintingrecords; stringvar Output:=""; numbervar letters; for Letters := 1 to len(trim(totext({table.field},2,""))) do( if isnumeric(mid({table.field,letters,1)) then Output:=Output & towords(val(mid({table.field,letters,1)))+" " else if mid({table.field,letters,1) = "," then Output:=Output & "Komma " 0; Output Should get you close. -k Upvote 0 Downvote
Well the comma is the tricky part. A formula such as: whileprintingrecords; stringvar Output:=""; numbervar letters; for Letters := 1 to len(trim(totext({table.field},2,""))) do( if isnumeric(mid({table.field,letters,1)) then Output:=Output & towords(val(mid({table.field,letters,1)))+" " else if mid({table.field,letters,1) = "," then Output:=Output & "Komma " 0; Output Should get you close. -k
Jul 10, 2006 Thread starter #4 jorgis Programmer Jun 26, 2005 3 BE There is some extra tricky part that I forgot. Total amount = 520,20 € it isn't five two zero komma two zero, but it has to be Five Hundred twenty komma twenty euro is that possible??? jm Upvote 0 Downvote
There is some extra tricky part that I forgot. Total amount = 520,20 € it isn't five two zero komma two zero, but it has to be Five Hundred twenty komma twenty euro is that possible??? jm
Jul 10, 2006 #5 synapsevampire Programmer Mar 23, 2002 20,180 US OK, try this then: towords(val(split("520,20",",")[1]),0) & " Komma " & towords(val(split("520,20",",")[2]),0) & " Euros" Replace the "520,20" with your field. -k Upvote 0 Downvote
OK, try this then: towords(val(split("520,20",",")[1]),0) & " Komma " & towords(val(split("520,20",",")[2]),0) & " Euros" Replace the "520,20" with your field. -k
Jul 10, 2006 #6 synapsevampire Programmer Mar 23, 2002 20,180 US Wait, if it's a numeric use: towords(val(split(totext({table.field,0,""),",")[1]),0) & " Komma " & towords(val(split(totext(table.field,0,""),",")[2]),0) & " Euros" -k Upvote 0 Downvote
Wait, if it's a numeric use: towords(val(split(totext({table.field,0,""),",")[1]),0) & " Komma " & towords(val(split(totext(table.field,0,""),",")[2]),0) & " Euros" -k
Jul 10, 2006 Thread starter #7 jorgis Programmer Jun 26, 2005 3 BE Tomorrow I try this in a special doc. at the office. If it doesn't work, I let you know. bye and thanks jm Upvote 0 Downvote
Tomorrow I try this in a special doc. at the office. If it doesn't work, I let you know. bye and thanks jm