[ACCEPTED]-SSRS Row Group + Column Group = RowNumber Issue-row-number

Accepted answer
Score: 27

Had same frustrating issue; lots of time 7 wasted. Eventually, this solution also helped:


Trick 6 here is NOT to use the name of the group 5 within the table/matrix, but the name of 4 the table itself. And yes, one would think 3 that using the table name for the scope 2 in the function RowNumber should work, but 1 it doesn't.

Score: 3

Try using:


If its a matrix, change the name 2 of the scope from the row scope to the 1 matrix scope.

Score: 2

I do with custom code.

Add this to code section 2 on report config:

Dim private count as integer = 0
Dim private iniRow as integer = 0
Public function nroFila(Byval rowNum as integer) as integer
    if iniRow = 0 then
        iniRow = rowNum
    end if

    if rowNum = iniRow then
        count = 0
    end if

    count = count + 1
    Return count
End function

Then, call the function 1 in a cell inside the group:

Score: 1

I seem to have found a solution, but it 6 feels like a hack... I'm leaving this unanswered 5 to see if someone else can provide a better 4 solution (read less hackish).

My Rank Expression 3 is now:

Everything seems to be ok. I 2 suppose I should IIf(Count... = 0, Then 1 RowNumber, else what I've got...

Score: 0

Best thing to do here, is make the Rank 3 column equal to =RowCount()/8

Since your 2 sure each visible row contains a total of 1 8 rows, this should work fine.

Score: 0

Add another rank column next to the existing 4 one and put another expression in that one 3 which takes the value from rank (rowcount?) and 2 divide it by 8. Then make the old rank column 1 invisible.

Score: 0

Are you absolutely certain that using RowNumber("NameOfOrganizationGroup") doesn't 11 work?

Click on the matrix, click the upper-left 10 corner selection box to select the entire 9 thing, then right-click on the selection 8 border and get properties. Switch to the 7 Groups tab and look at the names of the 6 groups in the Rows section. That's what goes 5 in the scope of the RowNumber() function.

If 4 you already know this and tried it, my apologies—I 3 didn't mean to assume you didn't know. It's 2 just not 100% clear from your question that 1 this is not the solution.

Score: 0

I got it by using a windowed function in 13 the SQL query, this counts the row correctly 12 within the column set.

dense_rank() over 11 (partition by mgr.employee_sk order by e.employee_sk) as 10 row_format

where mgr.employee_sk is my Lvl 9 2 Row Group, and e.employee_sk is my Lvl 8 3 Row Group (the detail level).

Then the 7 SSRS expression then refers to this column 6 from the query. To avoid it aggregating 5 I used a min function, and to avoid it not 4 displaying for rows that don't have data 3 in all columns of the column group I specified 2 the scope as my Level 3 Row Group.

=Iif(min(Fields!row_format.Value, "Employee") mod 1 2 = 1, "white", "aliceblue")

enter image description here

More Related questions