Thursday 28 August 2014

Row number for grouped data in RDLC Report



Rownumber function returns the number of the row of the dataset

Student_Name
Raja
Durai
Raja Durai
Raja Durai
Raja Durai
S.R Durai

If we would like to groupby Student _Name and show the row number beside each row, the result will be :

Row number              Student _Name
1                                 Raja
2                                 Durai
3                                 Raja Durai
6                                 S.R Durai

As you can see the row number value is not correct, actually it is correct because the rownumber function returns the number of row inside the dataset not inside the grouped data in the report

I am going to use runningvalue function for the grouped data inside "table1"

=runningvalue(Fields!Student _Name.Value,countdistinct,"table1")

Result:

Rownumber              Student _Name
1                                 Raja
2                                 Durai
3                                 Raja Durai
4                                 S.R Durai

2 comments: