Sum in footer from several groups

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

Guest

Hi!
I have a problem with the sum fuction. I have a report format like this

HEADER
.......
DETAIL
242 34 ..........
432 45 ..........
A FOOTER
Sample Sum=Last([Charge])
B FOOTER
Total Sum=ShouldAddFromAboveSampleSum

But if the report have serveral detail groups, how do I get the total sum?
BTW, the Charge data is not showing in detail section. Thank you.

the output looks like this

1000 ..................
1001 ..................
1002 ..................
Sample charge = 7
2000 ................
2001 ................
2002 ................
Sample charge = 4

Total charge = 11
 
I may make something confuse.
Sample sum is a value from a table, so using the Last function. But how to
Sum each groups' Sample sum value? I try to use Sum(Last([Charge]), but it
said it's aggregate fuction which I can't use in expression. How should I fix
it?
 
fox said:
I have a problem with the sum fuction. I have a report format like this

HEADER
......
DETAIL
242 34 ..........
432 45 ..........
A FOOTER
Sample Sum=Last([Charge])
B FOOTER
Total Sum=ShouldAddFromAboveSampleSum

But if the report have serveral detail groups, how do I get the total sum?
BTW, the Charge data is not showing in detail section. Thank you.

the output looks like this

1000 ..................
1001 ..................
1002 ..................
Sample charge = 7
2000 ................
2001 ................
2002 ................
Sample charge = 4

Total charge = 11


You need two copies of the sample sum text box in the A
footer section. Make one of them invisible and set its
RunningSum property to Over Group. Then the B footer text
box can display the total by refering to the running sum
text box, e.g. =runningsumtextbox
 
Yes, it works. Thank you very much.

Marshall Barton said:
fox said:
I have a problem with the sum fuction. I have a report format like this

HEADER
......
DETAIL
242 34 ..........
432 45 ..........
A FOOTER
Sample Sum=Last([Charge])
B FOOTER
Total Sum=ShouldAddFromAboveSampleSum

But if the report have serveral detail groups, how do I get the total sum?
BTW, the Charge data is not showing in detail section. Thank you.

the output looks like this

1000 ..................
1001 ..................
1002 ..................
Sample charge = 7
2000 ................
2001 ................
2002 ................
Sample charge = 4

Total charge = 11


You need two copies of the sample sum text box in the A
footer section. Make one of them invisible and set its
RunningSum property to Over Group. Then the B footer text
box can display the total by refering to the running sum
text box, e.g. =runningsumtextbox
 
Back
Top