Sum a value in a group header

A

Andy

Hi guys

I have a report using a query which gives me duplicate rows in the
details section (well almost duplicate - they are duplicate except for
one field.

For example, I have a table of incidents with an Amount field but
there may be many people attached to that incident.

When I retrieve all data around that incident including the people
attached I get one row for each person attached to the incident. All
data is duplicate except for the persons name.

So what I did was group by the incident number and put the data in the
group header, which worked fine. I hide the detail and only see one
row per Incident.

My problem now is that I need to sum the Amount field and Count the
records in the group header..not the detail.

I have tried to do this in the group footer but it seems to reference
the Amounts in the detail (which is hidden). So instead of getting a
total of say $5,000 I will get $15,000 (assuming there are three rows
for the same incident).

How can I calculate the value of the Amounts in the group header and
also Count the rows in the group header?

Thanks...Andy
 

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