dbTalk Databases Forums  

Report Sum

comp.databases.ms-access comp.databases.ms-access


Discuss Report Sum in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
DS
 
Posts: n/a

Default Report Sum - 11-30-2004 , 01:55 PM






How do you get a sumon a calculated field in a detail section on a
report? I have a group footer that I need the sum on.
Thanks
DS

Reply With Quote
  #2  
Old   
Dave M
 
Posts: n/a

Default Re: Report Sum - 11-30-2004 , 02:22 PM






You have to sum the calculation rather than refer to the name of the
calculated control (presumably a text box). So if your Detail section
contains a text box named "txtTotal" and that text box's Control Source is
"=[Price] * [Quantity]" then your sum has to be in a text box with the
Control Source "=Sum([Price] * [Quantity])" rather than "=Sum([txtTotal])


"DS" <bootybox (AT) optonline (DOT) net> wrote

Quote:
How do you get a sumon a calculated field in a detail section on a
report? I have a group footer that I need the sum on.
Thanks
DS



Reply With Quote
  #3  
Old   
DS
 
Posts: n/a

Default Re: Report Sum - 11-30-2004 , 02:28 PM



Dave M wrote:
Quote:
You have to sum the calculation rather than refer to the name of the
calculated control (presumably a text box). So if your Detail section
contains a text box named "txtTotal" and that text box's Control Source is
"=[Price] * [Quantity]" then your sum has to be in a text box with the
Control Source "=Sum([Price] * [Quantity])" rather than "=Sum([txtTotal])


"DS" <bootybox (AT) optonline (DOT) net> wrote in message
news:7i4rd.84$L71.15 (AT) fe08 (DOT) lga...

How do you get a sumon a calculated field in a detail section on a
report? I have a group footer that I need the sum on.
Thanks
DS



Right, I tried that and I still get nothing. Am I doing something wrong?
Thanks
DS


Reply With Quote
  #4  
Old   
DS
 
Posts: n/a

Default Re: Report Sum - 11-30-2004 , 02:30 PM



Dave M wrote:

Quote:
You have to sum the calculation rather than refer to the name of the
calculated control (presumably a text box). So if your Detail section
contains a text box named "txtTotal" and that text box's Control Source is
"=[Price] * [Quantity]" then your sum has to be in a text box with the
Control Source "=Sum([Price] * [Quantity])" rather than "=Sum([txtTotal])


"DS" <bootybox (AT) optonline (DOT) net> wrote in message
news:7i4rd.84$L71.15 (AT) fe08 (DOT) lga...

How do you get a sumon a calculated field in a detail section on a
report? I have a group footer that I need the sum on.
Thanks
DS



PS That calculated control is based on another calculated control.
DS


Reply With Quote
  #5  
Old   
Dave M
 
Posts: n/a

Default Re: Report Sum - 11-30-2004 , 03:19 PM



Aha! That makes it more complicated, but you can still do stuff like

=Sum(([Cost] + [Tax]) * [Quantity])

However, if it's getting to that point, you're probably better off to do as
much of the calculation as you can in a query that then supports the
report.. If you have a calculated field in a query that looks something
like Extension[Cost] + [Tax]) * [Quantity]) you can then have a text box
for the Exetnsion field in your Detail section, and then a summary textbox
that uses =Sum([Extension]) in the appropriate footer(s).

"DS" <bootybox (AT) optonline (DOT) net> wrote

Quote:
Dave M wrote:

You have to sum the calculation rather than refer to the name of the
calculated control (presumably a text box). So if your Detail section
contains a text box named "txtTotal" and that text box's Control Source
is
"=[Price] * [Quantity]" then your sum has to be in a text box with the
Control Source "=Sum([Price] * [Quantity])" rather than
"=Sum([txtTotal])


"DS" <bootybox (AT) optonline (DOT) net> wrote in message
news:7i4rd.84$L71.15 (AT) fe08 (DOT) lga...

How do you get a sumon a calculated field in a detail section on a
report? I have a group footer that I need the sum on.
Thanks
DS



PS That calculated control is based on another calculated control.
DS



Reply With Quote
  #6  
Old   
DS
 
Posts: n/a

Default Re: Report Sum - 11-30-2004 , 03:29 PM



Dave M wrote:

Quote:
Aha! That makes it more complicated, but you can still do stuff like

=Sum(([Cost] + [Tax]) * [Quantity])

However, if it's getting to that point, you're probably better off to do as
much of the calculation as you can in a query that then supports the
report.. If you have a calculated field in a query that looks something
like Extension[Cost] + [Tax]) * [Quantity]) you can then have a text box
for the Exetnsion field in your Detail section, and then a summary textbox
that uses =Sum([Extension]) in the appropriate footer(s).

"DS" <bootybox (AT) optonline (DOT) net> wrote in message
news:OO4rd.143$A12.115 (AT) fe08 (DOT) lga...

Dave M wrote:


You have to sum the calculation rather than refer to the name of the
calculated control (presumably a text box). So if your Detail section
contains a text box named "txtTotal" and that text box's Control Source

is

"=[Price] * [Quantity]" then your sum has to be in a text box with the
Control Source "=Sum([Price] * [Quantity])" rather than

"=Sum([txtTotal])


"DS" <bootybox (AT) optonline (DOT) net> wrote in message
news:7i4rd.84$L71.15 (AT) fe08 (DOT) lga...


How do you get a sumon a calculated field in a detail section on a
report? I have a group footer that I need the sum on.
Thanks
DS



PS That calculated control is based on another calculated control.
DS



Thanks I'll give it a try and let you know.
DS


Reply With Quote
  #7  
Old   
DS
 
Posts: n/a

Default Re: Report Sum - 11-30-2004 , 04:28 PM



Dave M wrote:

Quote:
Aha! That makes it more complicated, but you can still do stuff like

=Sum(([Cost] + [Tax]) * [Quantity])

However, if it's getting to that point, you're probably better off to do as
much of the calculation as you can in a query that then supports the
report.. If you have a calculated field in a query that looks something
like Extension[Cost] + [Tax]) * [Quantity]) you can then have a text box
for the Exetnsion field in your Detail section, and then a summary textbox
that uses =Sum([Extension]) in the appropriate footer(s).

"DS" <bootybox (AT) optonline (DOT) net> wrote in message
news:OO4rd.143$A12.115 (AT) fe08 (DOT) lga...

Dave M wrote:


You have to sum the calculation rather than refer to the name of the
calculated control (presumably a text box). So if your Detail section
contains a text box named "txtTotal" and that text box's Control Source

is

"=[Price] * [Quantity]" then your sum has to be in a text box with the
Control Source "=Sum([Price] * [Quantity])" rather than

"=Sum([txtTotal])


"DS" <bootybox (AT) optonline (DOT) net> wrote in message
news:7i4rd.84$L71.15 (AT) fe08 (DOT) lga...


How do you get a sumon a calculated field in a detail section on a
report? I have a group footer that I need the sum on.
Thanks
DS



PS That calculated control is based on another calculated control.
DS



Thanks That worked. I guess I was getting kinda deep in Calculated fields!!
DS


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.