Row number in SSRS
I want to display Row number as shown in the below format on column grouping. I need to reset the row number value when the row group changes. When I tried the row number function, It is showing the improper result. Is there any other alternate way to bring the row number as I required. Can you help us in this issue. Region1 Region2 Product Names Fiscal Month Name Rec.no Recno Pen drives July 1 1 August 2 2 Desktops September 1 1 October 2 2
December 10th, 2010 1:54am

We have Row Number function you can use that Following are few refinances to do the same http://www.kodyaz.com/articles/article.aspx?articleid=52 http://technet.microsoft.com/en-us/library/ms157328.aspx http://msdn.microsoft.com/en-us/library/ms159225(SQL.100).aspxGaurav Gupta http://sqlservermsbiblog.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2010 2:30am

Instead of designing in Report, how about doing in SQL query statement itself to get rownumber, which will rownumber for each row. select [Name],Number,[Type],Low,Row_Number() Over(order by Name) as Rownumber from tableValues Nanda - Misys Software Solutions,Bangalore
December 10th, 2010 3:27am

Hi Gaurav, Thanks for your response, I tried using Rownumber("ProductNames") for first 2 products i am getting correct record numbers but from 3rd prducts i am getting improper record numbers,and even after selecting product name i am getting wrong record numbers
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2010 3:30am

Can you please shre you SSRS expression for Rownumber. Gaurav Gupta http://sqlservermsbiblog.blogspot.com/
December 10th, 2010 4:34am

hi, I'm not using the SQL database service to write TSQL commands. I'm using cubes. so we cant do that.
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2010 4:38am

Expression I used, =Rownumber("ProductNames")
December 10th, 2010 4:39am

Can you try following. =Rownumber("FiscalMonthName") I suppose you want it when ever row grouping change, you have one more grouping on FiscalMonth right?? If you dont have any grouping on Fiscal month then try to make one and give this a shot. Gaurav Gupta http://sqlservermsbiblog.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2010 4:54am

Yes under products we have fiscalMonth grouping. I tried this =Rownumber("FiscalMonthName"),its showing wrong format.First 2 products for all months its showing as 1 and rest products it showing 2 for all months,instead of this i want to show 1,2,3..... for Fiscal months and once again rownumber should be reset to 1,2,3...for Fiscal months for the next product.
December 10th, 2010 5:40am

If you are grouping by Product Names then try RowNumber("ProductNameGroup"). Please let me know.. Thanks, Senthil
Free Windows Admin Tool Kit Click here and download it now
December 10th, 2010 6:04am

Hi Senthil, Thanks for your response. If i am using RowNumber("ProductNameGroup") then for 1st 2 product names the numbers are displaying in correct format i.e 1,2,3,4,5.... , but from 3rd product names the numbers are displaying as 2,4,6,8,10.... instead of 1,2,3,4,5......
December 10th, 2010 6:12am

Hi, Please modify your expression to this =Runningvalue(Fields!Fiscal Month Name.Value,countdistinct,"Product Names") Here: Fiscal Month Name is the datafields' name, Product Names is group name. Thanks, Challen Fu [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
December 13th, 2010 3:44am

Hi Challen, Thanks a lot for your response. Regards, Raghavan
December 13th, 2010 5:14am

Hi Challen, Thanks a lot for your response. Regards, Raghavan
Free Windows Admin Tool Kit Click here and download it now
December 13th, 2010 5:14am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics