Reputation: 145
I am currently new to Crystal Reporting and I have no idea how to do a looping statement.
Is it possible to create a counter using for loop then print the numbers from 1 to 15?
P.S. No data field will be used
For example (this is in java but I want it to be in Crystal Report)
int count;
for(count = 1; count <= 15;count++)
System.out.print( count+",");
Upvotes: 1
Views: 1982
Reputation: 7527
The following formula should return the wanted result:
NumberVar i;
StringVar str;
For i := 1 To 15 Do
(
str := str & CStr(i,0,"") & ","
);
str
The part CStr(i,0,"")
converts the number to a string and removes decimals and the thousands separator.
Upvotes: 1