#Error on SUM in Page Footer

  • Thread starter Thread starter Steven M. Britton
  • Start date Start date
S

Steven M. Britton

I am trying to sum a value in my page footer, I have in
the detail section the data I want to sum. In the detail
I have (Name.TotalDailyExpense) and the control source is =
[AmountBilledforCaseManager]+[AmountBilledforJobCoach]+
[AmountBilledforCrew]. In the detail this adds up
correct, now if I go to the Page footer and try =Sum
(TotalDailyExpense) I get an #Error???? But if I copy the
TotalDailyExpense and place it in the page footer, it
returns the first of the details in the page footer. Any
idea, is this common or is there something I am just over
looking???

-Steven M. Britton
 
You need to repeat the expression; the report footer's textbox's control
source must use the field names in Sum:

=Sum([AmountBilledforCaseManager]+[AmountBilledforJobCoach]+[AmountBilledfor
Crew])
 
Two issues:
1) you can't sum a control. You must sum the expression

=Sum([AmountBilledforCaseManager]+[AmountBilledforJobCoach]+[AmountBilledfor
Crew])
2) You can't sum anything in a page footer. Sum() will only work in Group
and Report Footers (and Headers)

There is a knowledgebase article on creating sums in page footer sections.
 
See:
Reports: Page Totals
at:
http://allenbrowne.com/ser-11.html

The basic idea is to collect the total programatically from the Print event
of the detail section, drop it into the Page Footer in its Format event, and
reset it in the Page Header's Format event.
 
Back
Top