Skip to Content
avatar image
Former Member

How to count number by differenct group


Good Morning.

I have a report in BO, and I am trying to achieve the following function, but I don;t know how to do it. I have a table below..

And this table is sorted by depart time and badge time;

And what I want to do is: all 541-1 show 1 for dispatch order( because it is the first number show up, and then 541-5 show 2)

Another trick thing is there is a another 541-1 at the bottom with different depart time, but it should show besed on how many unique badge number above+1)

If you have any idea, please teach to how to do it and thanks so much


3xkg7.png (11.5 kB)
0w0aa.png (6.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 24, 2016 at 01:35 PM

    You can use a variable and increment on change of badge number

    this assumes data not grouped and count does not need to change for new group, replace text badgenumber with relevant field.


    whileprintingrecords; global numbervar n; if recordnumber = 1 then n:=1 else if badgenumber <> previous(badgenumber) then n:=n+1 else n:=n; n;


    Add comment
    10|10000 characters needed characters exceeded