Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sequential Row Numbers

Status
Not open for further replies.

rose4567

Programmer
Mar 12, 2007
70
US
I'm using SSRS Visual Studio 2005. This seems like it should be fairly simple, but I'm hung up and need some help.

The data in my SQL query is ungrouped because it's performing some calculations by detail row. Each customer could have several detail rows associated with them. When I output the results, I am grouping at the detail level and only displaying the customer name once and want to simply number the customer names sequentially.

I've tried using the detail level group name like:
=CountRows("table1_Details_Group") but that just outputs the number of rows associated with each customer.

Is there a simple way to just number the detail rows sequentially? Or perhaps I need to use some Code then call to it in the expression. I've hit a wall here and would very much appreciate any suggestions.
 
I'm having the same issue. I've found the following gets me close:
Code:
=RowNumber(Nothing)
or 
=RowNumber("GroupName")

MSDN: RowNumber Function

--------------------------------------------------
"...and did we give up when the Germans bombed Pearl Harbor? NO!"

"Don't stop him. He's roll'n."
--------------------------------------------------
 
Please see my post of today on this forum on how to create group numbering.

Thanks,
Shawn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top