TheBlondOne
Programmer
Hi all,
Im creating a fairly big crystal report, that contains about 5000+ records. What im trying to do is put a number at the side of each record to group on (thats the easy part). I then want to convert that number into text e.g
one
two
three....etc.
I have tried using the towords function but that returns extra parts that i don't need. E.g
Record number 4 is returned as four and xx/100.
The formula that i am using to test with at the minute is printed below, but as you can appreciate, im not manually typing in the number and then the text for 5000+ records, so any ideas would be appreciated.
Thanks in advance.
whileprintingrecords;
stringvar number;
numbervar crecordnumber:= crecordnumber + 1;
if crecordnumber = 1 then number := "one" else
if crecordnumber > 2 then number := "two" else
if crecordnumber = 3 then number := "three" else
if crecordnumber = 4 then number := "four" else
if crecordnumber = 5 then number := "five" else
if crecordnumber = 6 then number := "six" else
if crecordnumber = 7 then number := "seven".....etc
Im creating a fairly big crystal report, that contains about 5000+ records. What im trying to do is put a number at the side of each record to group on (thats the easy part). I then want to convert that number into text e.g
one
two
three....etc.
I have tried using the towords function but that returns extra parts that i don't need. E.g
Record number 4 is returned as four and xx/100.
The formula that i am using to test with at the minute is printed below, but as you can appreciate, im not manually typing in the number and then the text for 5000+ records, so any ideas would be appreciated.
Thanks in advance.
whileprintingrecords;
stringvar number;
numbervar crecordnumber:= crecordnumber + 1;
if crecordnumber = 1 then number := "one" else
if crecordnumber > 2 then number := "two" else
if crecordnumber = 3 then number := "three" else
if crecordnumber = 4 then number := "four" else
if crecordnumber = 5 then number := "five" else
if crecordnumber = 6 then number := "six" else
if crecordnumber = 7 then number := "seven".....etc