Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report multiple items with only 1 record (for-to-next loop)

Status
Not open for further replies.

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 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top