sum of 2 subreports

N

Nydia

I have a 2 queries, 1 qry that shows group hours 2nd qry
that shows individual hours. i created a main report and
i want to put 2 subreports based on these 2 queries. at
the bottom of the main report i want to put total number
of hours served and i have to add up all the [durations]
from both queries can this be done?
example
subreport 1
john smith-group hours
1/1/01 3hour
1/5/01 6hours
subreport 2
john smith-individual hours
1/2/01 1 hour
1/4/01 1.5 hours
total hours served: 11.50 hours
 
K

Kelvin

Create a 3rd query to calculate this total and include as a 3rd subreport
below the first 2 on the report.

Kelvin
 
D

Duane Hookom

There are potentially a couple other methods. If the recordsources of both
reports are very similar, combine them in a UNION QUERY with a derived field
for Individual or Group. Then build a single report that groups on the
derived field.

Add summary text boxes on each subreport and a text box on the main report
with a control source like:
=IIf(subrptInd.Report.HasData,
subrptInd.Report.txtTotal,0)+IIf(subrptGrp.Report.HasData,
subrptGrp.Report.txtTotal,0)

--
Duane Hookom
MS Access MVP


Kelvin said:
Create a 3rd query to calculate this total and include as a 3rd subreport
below the first 2 on the report.

Kelvin

Nydia said:
I have a 2 queries, 1 qry that shows group hours 2nd qry
that shows individual hours. i created a main report and
i want to put 2 subreports based on these 2 queries. at
the bottom of the main report i want to put total number
of hours served and i have to add up all the [durations]
from both queries can this be done?
example
subreport 1
john smith-group hours
1/1/01 3hour
1/5/01 6hours
subreport 2
john smith-individual hours
1/2/01 1 hour
1/4/01 1.5 hours
total hours served: 11.50 hours
 

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