Coverting number into letter

HedleyHedley Peru
edited 4:45AM 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:45AM
    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:45AM
    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:45AM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.