Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

summing a text box 2

Status
Not open for further replies.

demoman

Programmer
Oct 24, 2001
242
US
I apologize in advance, but I cannot remember how to sum a text box. The text box is bound to a column located in a footer section. At the next footer, I want to sum them up

=sum([text1]) - but that does not work
=sum([text1].[value]) - does not work

appreciate the answer
 
You have to sum the field/calculation that is in text1.
(If text1 contains Qty*Price then your sum control must have =Sum(qty*price))
 
My usual way to do this is:

-- Create an unbound text box in the 'Detail' area of the report. Call this e.g. txtTotal
-- Set the Control Source property for this text box to be:
Code:
=[NumericField]
where this is the name of the field containing numeric data which you wish to sum.
-- Set the Running Sum property for this text box to be 'Over All'
-- Once you have tested your report, set the Visible property of this text box to 'False'

-- Now, create a second unbound text box in the page footer or report footer, as required. Call this e.g. txtDisplayTotal
-- Set the Control Source property for this text box to be:
Code:
=[txtTotal]

When you run the report, txtDisplayTotal will show you the 'sub total so far' if in the page footer, and the report grand total if in the report footer.

I hope that this helps.

Bob Stubbs
 
Thanks Gents! I basically did what Bob said - although the field is located in the first footer. I only want to count 1 for each break iteration, not each row in the detail. Appreciate the posts. Most of our reporting is now done in crystal, so i am forgetting some of the legacy stuff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top