user3392650
user3392650

Reputation: 3

Want to print numbers in details section of my crystal report

I have a crystal report i want to print the numbers in detail section like this ....... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 16 17 18 19 20

In this I will pass Starting Number and Last Number. In given example starting number is 1 and last number is 20. This is possible or not ???

Upvotes: 0

Views: 1475

Answers (2)

craig
craig

Reputation: 26262

Assuming that you have two parameters: {?start} and {?end}, create a formula:

// {@generate}

Local Stringvar Array values;
Local Numbervar i;

for i:= {?start} to {?end} do (
  Redim Preserve values[Ubound(values)+1];
  values[Ubound(values)]:=ToNumber(i,"#")
);

Join(values);

Upvotes: 0

Siva
Siva

Reputation: 9091

Create a formula @Count place it in page header or Report header.

Shared NumberVar i;
i:=0;

Create a formula @Display and place it in detail.

Shared NumberVar i;

i:=i+1;
i;

Upvotes: 1

Related Questions