Aug 6, 2003 #1 thebobman Programmer Sep 25, 2000 12 US I have a table that has a single record (NUMBER). I need to print a report showing the next 100 incremental numbers. Is a for-to-next loop the best way to do this? If so can you please give me some examples?
I have a table that has a single record (NUMBER). I need to print a report showing the next 100 incremental numbers. Is a for-to-next loop the best way to do this? If so can you please give me some examples?
Aug 6, 2003 #2 synapsevampire Programmer Mar 23, 2002 20,180 US I don't have CR handy, but it would work like this: whileprintingrecords; numbervar counter; numbervar x :=1; numbervar array AllNumbers [100]; for Counter := {table.field} to {table.field}+99 do( AllNumbers[x] := Counter; x := x+1 ); join(Allnumbers,chr(13)) If you have an old version of CR (8.5 or below), you'll need to split this out to less than 254 chars per formula, but the same theory applies. -k Upvote 0 Downvote
I don't have CR handy, but it would work like this: whileprintingrecords; numbervar counter; numbervar x :=1; numbervar array AllNumbers [100]; for Counter := {table.field} to {table.field}+99 do( AllNumbers[x] := Counter; x := x+1 ); join(Allnumbers,chr(13)) If you have an old version of CR (8.5 or below), you'll need to split this out to less than 254 chars per formula, but the same theory applies. -k