Skip to Content

How to count number by differenct group

Nov 22, 2016 at 03:22 PM


avatar image


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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ian Waterman 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;


10 |10000 characters needed characters left characters exceeded