Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group by counts duplicate records 1

Status
Not open for further replies.

piper181

Programmer
Jun 24, 2003
2
CA
Within the details section duplicate records are hidden by suppressing the duplicate record. Now when i summarize the details section it is counting the hidden duplicate record.

Is there any way to stop the group total from including the duplicate record. Can not use discount count as it eliminates valid records.

Any help would be appreciated.
 
Instead of eliminating the duplicate rows in the details section, eliminate them from the report by using the equivalent criteria in the Report->Edit Selection Formula->Record

If you need further assistance, it will help if you post what you're currently using to eliminate the dupes.

-k
 
SV's way is the best choice

but

if that is not possible for whatever reason then you must do a manual count/summary

Here you use the same criteria, for suppressing the unwanted record, in eliminiating it from a count or sum or other summary operation.

I can help you there if you wish to take that route but I need more details about your report.

Jim Broadbent
 
Thanks for the replys, however here's how the report works. Firstly, the report writer is in VB6.

The Report has 4 levels of Groups that are used to represent a hierarchy. The last Group takes it down to the employee level which is used to show courses that they need. The main course can have a one to many relationship where the main course is repeated witht the many courses thus the duplicate record. If I remove the duplicates then i will lose the corresponding many course. Any help would be appreciated with the counters.


 
You could activate the Select Distinct Records function from the Database menu. Then you wouldn't need to hide any.

Naith
 
You can use running totals to count non-duplicated records. Using the running total editor, select {yourfield}, select distinctcount, choose &quot;evaluate - use a formula&quot; and in the x+2 area enter: {yourfield} <> previous({yourfield})
If you have other conditional criteria, add them into the formula. Reset on a group level or never depending on your requirements.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top