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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting Clients with More than one event type?

Status
Not open for further replies.

jaybar48

Technical User
Feb 16, 2002
61
US
Hi

I have a report with two main tables in a one to many relationship.

The first table {Client} contains the client_ID field. This is the "parent" table. The "child" table {event} contains several fields including {event_Type}, {event_Date} and {client_ID}, which is the linking field.

The values for {event.event_type} are either "A", "B" or "C". I want to exclude clients who only have a single event type during the reporting period.

For example, lets assume I had only three clients by my database:


Event_type Event_date Client_id

A 1/1/04 101
A 2/1/04 101
A 3/1/04 101
A 1/1/04 102
C 2/1/04 102
C 3/1/04 102
B 2/1/04 103
B 3/1/04 103

Clients 101 and 103 would be excluded if the report range were 1/1/04-3/1/04 because the event types are the same.


How might I do this?

Thanks so much,

Jay
 
Group on {table.clientID} and then go to report->edit selection formula->GROUP and enter:

distinctcount({table.eventtype},{table.clientID}) > 1

This will return only those clients with more than one event type. If you want to do further calculations on group-selected records, you will need to use running totals as non-group selected records will still contribute to the more usual summaries.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top