View Full Version : Suppress Group Header Duplicates


PBE
06-07-2007, 07:49 AM
Hi
Help would be grately appreciated.

Date Code Amount
09/03/2007 ABC001 £5,915.50
23/04/2007 ABC001 £4,074.00
20/05/2007 ABC001 £120.23
16/05/2007 CAD012 £479.50
20/05/2007 CAD012 £125.50
21/03/2007 QWE098 £54.50

The above are group headers where the Amount is a sum of the entries in the details section. What I want to be able to do is just display the earliest entry for each code ie. suppress the duplicate entries with the same code. In Excel I would use VBA and hide the duplicate entries. Is this possible in Crystal? The result would be:-

Date Code Amount
09/03/2007 ABC001 £5,915.50
16/05/2007 CAD012 £479.50
21/03/2007 QWE098 £54.50

I have tried suppress if duplicated but this only seems to work in the details section.

Thanks

Pete

boblarson
06-07-2007, 08:07 AM
And you went in to Format Text for the text box on your group and selected the Supress if Duplicated for that text box?

PBE
06-07-2007, 08:17 AM
Thanks for your reply. I have tried this and it doesn't do it.

boblarson
06-07-2007, 08:26 AM
I guess that would be because this:
09/03/2007 ABC001 £5,915.50
is not really a duplicate of this:
23/04/2007 ABC001 £4,074.00

You would need to look into your grouping to group by ABC001, etc. and then for the date and value set the select to select the max date.

PBE
06-07-2007, 08:35 AM
I'm not sure what this means but I will see if I can get it to select only the ones with earliest date using a formula.

Thanks this has given me something to try.