Need help counting a group

I

Ian Tranter

I have a report based on a query (runtime Efficiencies),
this query lists all work done on a day (many days) &
calculates the number of hours each machine has done per
entry.
The fields in the report are: strMachine, datDate, RUNT
(the calculated field for hour ran), the detail section
contains only the datDate & RUNT fields, then groups on
strMachine then datDate (working outwards from the detail
section), the datDate group is set to group on week in
the sorting & grouping dialog box.
The report runs fine, displaying the hours run for each
machine per week & total the number of hours for all
machines in the date footer, i.e.

Machine Hours
Lat_6 6.1
Mil_1 6.1
Mil_2 6.5
Mil_3 5.38

Total for week 24.08

My Question is how I count the number of machines that
have been booked on over a given week so that I can
calculate the % efficiency.
e.g.

Say that all machines have been working 3 shifts 112.5
hours a week:

4 x 112.5 = 450
Shop efficiency = 24.08/450 = 5.35%

I can see that there are four machines booked on for that
week but can't count them, I HAVE placed count(*) in the
footer but this returns the count of bookings over all
machines, HELP please??????
 
M

Marshall Barton

Ian said:
I have a report based on a query (runtime Efficiencies),
this query lists all work done on a day (many days) &
calculates the number of hours each machine has done per
entry.
The fields in the report are: strMachine, datDate, RUNT
(the calculated field for hour ran), the detail section
contains only the datDate & RUNT fields, then groups on
strMachine then datDate (working outwards from the detail
section), the datDate group is set to group on week in
the sorting & grouping dialog box.
The report runs fine, displaying the hours run for each
machine per week & total the number of hours for all
machines in the date footer, i.e.

Machine Hours
Lat_6 6.1
Mil_1 6.1
Mil_2 6.5
Mil_3 5.38

Total for week 24.08

My Question is how I count the number of machines that
have been booked on over a given week so that I can
calculate the % efficiency.
e.g.

Say that all machines have been working 3 shifts 112.5
hours a week:

4 x 112.5 = 450
Shop efficiency = 24.08/450 = 5.35%

I can see that there are four machines booked on for that
week but can't count them, I HAVE placed count(*) in the
footer but this returns the count of bookings over all
machines, HELP please??????

You can count the number of machine groups by using a text
box in the machine group footer section. Set its expression
to =1 and RunningSum to Over Group.

But... what if a machine is not available for part of the
time? Think about adding a field to your table to hold the
hours each machine is available. Then the report would be
able to sum that value for the efficiency calculation.
 
E

ET Sherman

Ian,

Try this:

Add a text control to the weekly grouping section of the
report.

Set the control source to =Count(strMachine)

Regards,

ET Sherman
 
I

Ian Tranter

Nop, that gives me the count of all the bookings for all
machines, 10 records over the 4 machines?
do i need to add anothe header footer?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top