Click to See Complete Forum and Search --> : crystal reports row count
bebitzaa
September 22nd, 2006, 02:44 AM
bebe lush posted at 20-Sep-06 05:58
How can i add a column in the report to count the rows, and to auto increment.
Like:
1. | line 1
2. | line 2
3. |
to show me the current number.
kvwarun
September 23rd, 2006, 12:30 AM
Friend,
Do one thing create one Formula Field named @SlNo, and insert into detail section. Formula is given below:
//--------------------------------------------------------
numberVar numSlno = 0;
IF PREVIOUSISNULL(<Name of Any Field>) THEN
numSlno := 1
ELSE
numSlno := numSlno + 1
//----------------------------------------------------------
sraheem
September 23rd, 2006, 01:30 AM
why use formula
just include record number itself :wave:
Madhi
October 1st, 2006, 01:12 AM
why use formula
just include record number itself :wave:
Thats correct way
betterandbetter
June 7th, 2007, 06:47 PM
I tried this one but I got error at the part (<Name of Any Field>). I am a newbie, could you please elaborate on it? Thanks a lot!
Friend,
Do one thing create one Formula Field named @SlNo, and insert into detail section. Formula is given below:
//--------------------------------------------------------
numberVar numSlno = 0;
IF PREVIOUSISNULL(<Name of Any Field>) THEN
numSlno := 1
ELSE
numSlno := numSlno + 1
//----------------------------------------------------------
JaganEllis
June 7th, 2007, 07:02 PM
Well, that code has a bug anyway.
As said before, in the Field Explorer, just use the special field Record Number.
swaroopbhave
June 12th, 2007, 05:04 AM
as one of the repliers said,
the best way to me is to add a special field recordNumber.
OR you can also use a running total field.
In fields Explorer, Create new Running Total Field, Choose any of the fields (Preferably numeric) Summerize.
and select Count .
Allow it to execute for Each Record
One of these things should solve the problem.
The Last Solution i would suggest will be to use shared variables.
Shaikh.Riyaz.a
June 12th, 2007, 08:16 AM
as one of the repliers said,
the best way to me is to add a special field recordNumber.
OR you can also use a running total field.
In fields Explorer, Create new Running Total Field, Choose any of the fields (Preferably numeric) Summerize.
and select Count .
Allow it to execute for Each Record
One of these things should solve the problem.
The Last Solution i would suggest will be to use shared variables.
Why to make things complicated?
Just use Record Number field.
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.