web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Add row number in Report

(0) ShareShare
ReportReport
Posted on by 172

Hi All,

I have create the report where I want serial number for each row. I have used the rowNumber(nothing) function but row number not coming in series. Can any one suggest?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    IF you are adding that to a group you need to use the GroupName instead of Nothing, or you can add an integer on NAV side and increment it OnafterGetRecord of the dataitem and use that integer as column or create a function in Report using VB and call that function  

  • RockwithNav Profile Picture
    8,637 Super User 2025 Season 2 on at

    Hey Pawar,

    RowNumber("Nothing") only works if you have a straight forward Report with no grouping or a grouping with a very simple design. If you want to want to add serial number then there are two ways either you do it via passing the exact group name based on which you want the Serial No increment or else easiest way is to write the code on Data Item triggers for the increment with the logic and put it on the Dataset and then pass it to the Visual studio.

    Thanks

    Blog - rockwithnav.wordpress.com

  • Suggested answer
    pawar.rajendra88@gmail.com Profile Picture
    172 on at

    Thanks all.

    I used the code on report properties.

    Dim private count as integer = 0

      Dim private iniRow as integer = 0

      Dim private iniGrp as Object = ""

      Public function MatrixRow(Byval rowNum as integer,Byval rowGrp as Object) as integer

      if iniGrp = "" then

         iniGrp = rowGrp

      end if

     if rowGrp <> iniGrp then

         iniRow = 0

         count = 0

         iniGrp = rowGrp

     end if

     if iniRow = 0 then

         iniRow = rowNum

     end if

     if rowNum = iniRow then

        count = 0

     end if

      count = count + 1

      Return count

     End function

  • Community Member Profile Picture
    on at

    Hi . Thanks for the code above . It works but it does not resets the row numbers for next page.Can you please suggest how to reset row numbers for each page.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans