Total in report header for calculated field

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

Guest

I have a control on my report that calculates the cost, depending on whether
the user has typed in their own value so [CCost] =
=IIf([Cost]>=0,[cost],[quantity]*[itemcost]).

I have put in a hidden textbox [CCostText] and I can use this to give me
totals at the end of each section and at the end of the whole report (using
over group and over all) - which is great. However I really want the overall
total at the top of the report - and I cannot persuade it to do this - but it
would if it was simply the [cost] that I was totalling.

Any ideas?
 
Try sum the expression for anywhere you need it such as group or report
headers or footers.
=Sum(IIf([Cost]>=0,[cost],[quantity]*[itemcost]))
 
Thanks Duane - works a treat

Duane Hookom said:
Try sum the expression for anywhere you need it such as group or report
headers or footers.
=Sum(IIf([Cost]>=0,[cost],[quantity]*[itemcost]))


--
Duane Hookom
MS Access MVP
--

HelenJ said:
I have a control on my report that calculates the cost, depending on
whether
the user has typed in their own value so [CCost] =
=IIf([Cost]>=0,[cost],[quantity]*[itemcost]).

I have put in a hidden textbox [CCostText] and I can use this to give me
totals at the end of each section and at the end of the whole report
(using
over group and over all) - which is great. However I really want the
overall
total at the top of the report - and I cannot persuade it to do this - but
it
would if it was simply the [cost] that I was totalling.

Any ideas?
 
Back
Top