NAV - RTC Report Reset Row No. / Serial No. on Group Change
This post is based on a query of one of my readers Peter Huba. During Report Development we face queries like resetting the Row No. when there is a change in Group.
What exactly did we try to do?
We tried to write C/AL code based on our group and try to set/reset a variable. But in some cases that doesn't help because we have a visibility condition in RDLC Rows which create issues.
What don't we do?
We don't try to lookup the power of Visual Studio for same. We still try to beat the bush using C/AL Code.
Now let's see how simple it is using Power of Visual Studio:
1. Created a simple Report Using Item Ledger Entry Table.
2. In Layout, Group the Report with Item.
3. In the above screen you can see Sr. No., let's see what the expression is I have used for that. Visual studio has a simple function RowNumber to get the Row Number. Function take Group Name as Parameter as show below.
4. Now let's save and run the report. the output is as below.
5. There are some items which don't have remaining quantity, as highlighted above.
6. Let's add a visibility condition for excluding those lines having remaining quantity as ZERO.
7. Let's run the report and select option to exclude lines with remaining quantity as ZERO.
And the output of the report is as below
I hope this will help some of the readers!
If required you can download the report from My SkyDrive Folder
FileName - NAV2013R2_Report_Serial_No_With_Grouping.rar