Grand Total on Main Report from 7 subreports

P

Pat H

I am working on a report I created to track training classes and hours taken.
I need to sum the hours in seven different categories to show the total hrs
taken in an employee’s anniversary year. Some of the training categories
will have no training hours since the training does not apply to them. I
created a sub report for each category which I then reference on my main
report. Each sub report has a total and then I want to grand total the sub
reports on my main report. I want to be able to pull the report by employee
name and a date range for completed training. On each of my sub reports I
have a field name =Act_Hrs, control source=Act_Hrs. In the report footer
section of my sub reports, a text box named Sum Of Act_Hrs and control source
“=Sum ([Act_Hrs])â€. This works fine and sums the hours on the sub reports.
I can’t seem to get an expression that will sum the totals of each sum of
actual hrs and give me a grand total. This is the expression I have tried
using.

=IIF(Sum([Act_Hrs]).R_TrainALL.HasData,
Sum([Act_Hrs]).R_TrainALL.Act_Hrs,0)+ Sum([Act_Hrs]).R_TrainCLIN.HasData,
Sum([Act_Hrs]).R_TrainCLIN.Act_Hrs,0)+ Sum([Act_Hrs]).R_TrainEDUC.HasData,
Sum([Act_Hrs]).R_TrainEDUC.Act_Hrs,0)+ Sum([Act_Hrs]).R_TrainMGMT.HasData,
Sum([Act_Hrs]).R_TrainMGMT.Act_Hrs,0)+ Sum([Act_Hrs]).R_TrainOTH.HasData,
Sum([Act_Hrs]).R_TrainOTH.Act_Hrs,0)+ Sum([Act_Hrs]).R_TrainSUPP.HasData,
Sum([Act_Hrs]).R_TrainSUPP.Act_Hrs,0)+ Sum([Act_Hrs]).R_TrainADMN.HasData,
Sum([Act_Hrs]).R_TrainADMN.Act_Hrs,0))

When I paste it in the control source and run my report it disappears. I
can’t figure out what I am doing wrong or how to correct it. This is the
first time I have tried something so complicated (for a novice). Can anyone
help me with this?
 

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