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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

general totals and sums in reports

Status
Not open for further replies.

tonyx666

MIS
Apr 13, 2006
214
0
0
GB
can someone please please tell me how to perform addition.. and general maths in reports..

i have used a query to show certain prices and i want to display totals.. etc on my report.. is there a simple way to do this in the report design view..

thanks.
 
You could put in some unbound text boxes and then in the control source try:

examples:

=Count([field1])
=Sum([field1])
=Count([field1]/[field2])
=Count([field1]+[field2])
=Sum([field1])/Sum([field2])

if this is not what your looking for could you give more details or an example.
Ps, You should probable have posted this in the Reports Forum.
 
ok, im sorry, i didnt realise there were report forums aswell.. my bad


ok i have made an unbound text box called 'total'

and i want it to display the sum of all the 'tdtotal' fields in the report..

in my report code would i just place

total=Sum([tdtotal])
 
i just tried

total=Sum([tdtotal])

in the code and it didnt work.. also, where should i place the total textbox.. in the footer?? under the main details??
 
In the control source of the 'total' text box put:
=sum(tdtotal)


Randy
 
this is working but it only works when i place the textbox in the 'detail' part of the report..

when i place it in the page footer, then it just says #error

why is this.. i want it to be at the bottom of the report.. how can i get around this?
 
In the report's design view. Select View > Sorting and Grouping from the menu bar. Group by the field you want totaled and select Yes for Group Footer. Place your text box in the Group Footer.


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top