i get wrong result in a sum operation in a report

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

Guest

i have a repot that contains two joined tables (employee and department) the
records of one table are repeated with every record in the other table for
example the salary of the same employee is repeated with every department the
employee works in then when i calculate the sum of the salaries of the
employees in a certain company the result is wrong because the reports sums
up the salary of the same employee many.
so i need your help thanx
 
Since you cannot just sum the repeated fields, you can use a Running Sum
text box to collect the salaries for each employee, and display the result
in the report footer.

1. In report design view, open the Sorting And Grouping box (View menu.)

2. In the dialog, choose the EmployeeID field (primary key of Employee
table), and in the lower pane, set Yes for Group Footer (or header if you
prefer.)

3. In the group footer section, add a text box with these properties:
Control Source Salary
Running Sum Over All
Name txtSalaryRS
Visible No

4. In the Report Footer section add a text box with these properties:
Control Source =[txtSalaryRS]
Format Currency
 
Back
Top