Coverting number into letter

HedleyHedley Peru
edited 4:23PM in FastReport 4.0
Hi,

i need to convert a field numeric value into a corresponding character letter, and i do that

case <alumpsll."2AS2O"> of
0:Memo125.Text:='';
1:Memo125.Text:='ONE;
2:Memo125.Text:='TWO';
3:Memo125.Text:='THREE';
else
Memo125.Text:='?'
end;

but i need to do the same for about 100 fields, i think that i would do faster if i do using an array

example..

define a array char(3) and asing values

char(1)='ONE'
char(2)='TWO'
char(3)='THREE'

then asign Memo125.text:=char(<alumpsll."2AS2O"> )

but i dont know how to do it inside the report.... it is posible to do ?

thanks a lot

Hedley

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:23PM
    there are many number to text functions in 3rd party libs for converting, it is not simple as many things have to be considered
    numeric system european, usa,
    language being used.
  • HedleyHedley Peru
    edited 4:23PM
    gordk wrote: »
    there are many number to text functions in 3rd party libs for converting, it is not simple as many things have to be considered
    numeric system european, usa,
    language being used.

    Dear gordk :

    is posible do that inside report ?

    i try to do for an specific and personalized report

    how to define a array inside report ?

    Hedley
  • gordkgordk St.Catherines On. Canada.
    edited 4:23PM
    I prefer to add custom functions as a library of functions then they are available to all reports.
    see the developers manual on how to create custom functions.

Leave a Comment