How to count EventType, to display # of This type...

morfusaf

Registered User.
Local time
Today, 01:52
Joined
Apr 24, 2012
Messages
78
Hello,


Ok, I have a database that has Events, People, and PeopleAtEvents(junction table).

On the Events, I have 2 Differnt Types of events


EventType =
Party or Duty


So, I want to pull a report for 1 person... I can do this already, that shows each event the person was apart of. At the bottom, I want it to count how many Parties the person was apart of and how many duties... then display these numbers on the bottom of the report.


Any Ideas how I can do a query or something, so that for each party.... it does... HowManyParties + 1 and I can display HowManyParties at the bottom or something? (HowManyParties is not in my tables).


I can get it to count the overal Events, but I need it split depending the Text in the EventType field...

I figure on the control source I need to do something... but I don't know how to write code with the expression builder.
 
Last edited:
This is the type of thing that you would typically do in the report. You could Group by the event type and then sum each type in the corresponding Group Footer. Or you could put two separate calculated controls in the Report Footer to sum each type separately. If you did this you could use a Control Source like the following (one for each type of event);

Sum(IIf([EventType]="Party",1,0))

Sum(IIf([EventType]="Duty",1,0))
 
Sweet thanks.
 

Users who are viewing this thread

Back
Top Bottom