Grand Totals

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that pulls from a query that contains a portion of salary
data. From a table that contains all salry data, I have queried only the pay
types from each employee that I am interested in.

In the report, I have added a text box that calulates each employees total
pay for the quarter, a text box that expresses as a percentage each employees
total pay by the grand total of all employees' pay, and a text box that
multiplies their percentage by another text box that contains an inputted
amount.

In the report footer section I would like to total all of the percentages
(the total should equal 100%) and I would like to total the boxes of each
employees' percentage times the inputted value (the total should equal the
inputted value).

I can't seem to get the totals to work in the report footer section.

Any ideas?
 
Tim said:
I have a report that pulls from a query that contains a portion of salary
data. From a table that contains all salry data, I have queried only the pay
types from each employee that I am interested in.

In the report, I have added a text box that calulates each employees total
pay for the quarter, a text box that expresses as a percentage each employees
total pay by the grand total of all employees' pay, and a text box that
multiplies their percentage by another text box that contains an inputted
amount.

In the report footer section I would like to total all of the percentages
(the total should equal 100%) and I would like to total the boxes of each
employees' percentage times the inputted value (the total should equal the
inputted value).

I can't seem to get the totals to work in the report footer section.


The Sum function can be used if you sum the expression used
to calculate the detail values. You didn't say what that
calulation is, but a simple example situation could be that
you want the total the items in an order. Each detail has a
text box named txtLineTotal with an expression like:
=Quantity * Price

The grand total in the footer can not us the expression:
=Sum(txtLineTotal)
Instead, it must use the expression:
=Sum(Quantity * Price)

If your line total calculations is too complex for that
approach, then try using another detail section text box
named txtRunLineTotal. Set its control source expression to
=txtLineTotal
and its RunningSum property to Over All (or Over Group?)
Then, the grand total in the footer can display the total in
a text box with the ecpression:
=txtRunLineTotal
 
In the total text box use the same formula you used in the report detail,
If you have a text box in the detail section that has the properties

Name: TextBoxName
ControlSource : [FieldName1] + [FieldName2]

In the total field you wont write
=Sum([TextBoxName])

You should write
= Sum ([FieldName1] + [FieldName2])
 
Back
Top