Skip to Content
0

Suppress group on a second condition (duplicate last names in group)

Nov 21, 2016 at 09:15 PM

25

avatar image

I have a fairly simple report, that I need to complicate. The report currently shows employees that have duplicate bank acct numbers. Data is grouped by bank acct#, and I have this in the group-selection formula:

Count ({EMACHDEPST.EBNK_ACCT_NBR}, {EMACHDEPST.EBNK_ACCT_NBR}) > 1

This checks for bank account groups that have more than a single entry.

Then I have this in the Group footer suppression:

If Count({EMACHDEPST.EBNK_ACCT_NBR}) < 2 then TRUE

And that suppresses the bank account group for those that have less than 2 entries.

Report uses 2 tables, employee and bank account. Just for background, generally these groups will be a couple that is using the same bank account - we are a school division so we have many married employees. So usually there will be a group header (bank acct# and the count of duplicates), and then the 2 detail rows (emp#, name, bank account). There are a few groups that have 3 rows (I guess 2 parents and a child).

So if there are 2 or more employees with the same bank account, they are printed.

THAT works.

Now the complication. User wants to suppress the group if the last name is the same. So say I have this...

12345 Jones Adam 1122334455
54321 Jones Mary 1122334455

Bank acct 1122334455 2

32156 Smith John 998877
5462 White Sara 998877

Bank acct 998877 2

So I would want to suppress the first group - the Jones - due to the duplicate name.

Racking my brain here but I'm stumped. How do I suppress the group for a duplicate name within the group?
Appreciate your help!!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Brian Dong Nov 21, 2016 at 09:32 PM
0

Hi,

The best way to do this is to create another group based on Last Name if you can. Then do the suppress if the Last Name is > 1. You'll still need to group on Account and Emp#. You just need to create a new group underneath for the Last Name.

Hope this helps,

Brian

Share
10 |10000 characters needed characters left characters exceeded
CB Writer Nov 21, 2016 at 09:49 PM
0

11-21-2016-4-48-34-pm.jpg

So, add the Last Name as shown in my screen shot?


Share
10 |10000 characters needed characters left characters exceeded