9
votes

I am working with SSRS 2008. In one of my report I have a table with 3 columns. Sr. No, Column 1, Column2. Sr. No is -RowNumber("DataSet") and other are two are data set columns. I have grouped (Row Group) my table on Column 1 and Column 2. This is ok but the Sr.No column doesn't show right count it shows row number of grouped row e.g 2,4,9,10 so on. I want to keep the Sr.No or row number after grouping and on top of my table I want to show the count of rows in my table after grouping.

please suggest

1
Would you be able to give an example table of your desired output based on some sample data? I found it a bit difficult to tell what is required here just from your description.Ian Preston

1 Answers

16
votes

For distinct numbering of rows you can try this:

=RunningValue(CountDistinct("YourTableName"),Count,"YourTableName")

If you have only one grouping level in your report, you could group your values in the SQL query and then add new column ROW_NUMBER() OVER(...) numbering your rows in SQL query already.