I want to assign an index to each row of the query result, I am following this method to achieve that.
This index number is not for displaying purpose, if it is only for displaying, using RowNumber()
in SSRS is enough. Instead, I will be using that index number for filtering purpose. Please also note that SSRS cannot use RowNumber()
in Filter Expression.
For example, I want the results with index < 10 to be displayed in tablix 1, index >= 10 will be displayed in tablix 2, something like that.
My query works fine in MySQL, until I run it with SSRS, it comes out the error. Looks like SSRS does not support the :=
operator in @curRow := @curRow + 1 AS row_number
. If I remove the colon :
from the operator, the error gone, but row number does not increment.
Why SSRS does not support the :=
operator? is there any other workaround?