Today I need to show row number for each group in RDLC Report of Dynamics NAV 2015. I tried to search in Google and found the function “RowNumber” and “RunningValue”. But, both of them did not work for me. So, I try to make my own function to achieve my goal to show row number for each group like below.
I want to share my finding to all of you.
- Go to Layout of report.
- In “Report Properties”, click “Code”.
- In “Code”, type code like below to show row number for each group in your report.
Dim IntCountGroup1 as integer = 0 Dim IntCountGroup2 as integer = 0 Public Function GetRowNoGroup1() IntCountGroup1 = IntCountGroup1 + 1 Return IntCountGroup1 End Function Public Function GetRowNoGroup2() IntCountGroup2 = IntCountGroup2 + 1 Return IntCountGroup2 End Function
- In cell of group 1 in your tablix report, use expression like below.
- In cell of group 2 in your tablix report, use expression like below.
I hope it helps you to show row number for each group in your RDLC Report.
Please correct me if I am wrong.
God bless you all 🙂
5,504 total views, 7 views today