Hi All,
I am using CR 2008 and i want to convert number to word.
Number is 39.4030 and i used a
formula 1: called this "Convert units to word"
ToWords(truncate({@Units to Sell},0),0)+" point "+ToWords(Val(Right(totext({@Units to Sell}),2)),0)
Then Formula 2: called this "Display"
whileprintingrecords;
stringvar array x;
redim preserve x[ubound(x)+1];
numbervar counter := 0;
stringvar result := "";
x := split({@Convert units to words}," ");
for counter := 1 to ubound(x) do(
result := result + ucase(left(x[counter],1))+mid(x[counter],2) + " ");
replace(result,"And","and");
Result:
Showing as Thirty-nine point Forty
Expected result should be:
Thirty-nine Point Forty and Thirty
I can't get this to show the thirty (30). Can someone please help.
Much appreciated.
Sol
I am using CR 2008 and i want to convert number to word.
Number is 39.4030 and i used a
formula 1: called this "Convert units to word"
ToWords(truncate({@Units to Sell},0),0)+" point "+ToWords(Val(Right(totext({@Units to Sell}),2)),0)
Then Formula 2: called this "Display"
whileprintingrecords;
stringvar array x;
redim preserve x[ubound(x)+1];
numbervar counter := 0;
stringvar result := "";
x := split({@Convert units to words}," ");
for counter := 1 to ubound(x) do(
result := result + ucase(left(x[counter],1))+mid(x[counter],2) + " ");
replace(result,"And","and");
Result:
Showing as Thirty-nine point Forty
Expected result should be:
Thirty-nine Point Forty and Thirty
I can't get this to show the thirty (30). Can someone please help.
Much appreciated.
Sol