sum subreport control value in main report

J

JohnLute

I'm trying to sum the value in a subreport control in its main report. I've
placed the following code in the main report's control source:

=Sum([srptProjectsResponsiblesTimeMthlySum]![ProjectHoursMinutesSubtotal])

This returns a parameter dialog asking for a value so obviously it isn't
right. Can anyone help?

Thanks!
 
D

Duane Hookom

My general recommendation is to create a totals query similar to the
subreport's record source. This query should group by the same level of
detail as the main report and sum/avg/count to get the value required in your
main report. Add this new totals query to your main report's record source
and join the appropriate fields.

You can then ignore the subreport total and use the summary value from the
main report's record source.
 

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