Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello guys... i would like to ask how to display the sum of the items in my report? well i know how to do the summation formula like =sum(fields!field.value) but using this formula i want it to display on every page... assuming i have 100 records and i have a field name expenses... now i want to sum up all the expenses and display in on every page...
Example..
I would like to sum all the expenses displayed on page 1 and display the sum of it on page 1. then on page 2 all the expenses displayed on page 2 i want it to be summed and display on the same page... i tried putting it to a page footer and it works but what if the number of items is only 3 so i want the total of all expenses to be displayed right after the last record in my report like this

-----------------------
Page 1.
(here is the page header)
------------------------
Name   |   Expenses
-------+------------
name1  |  27
name2  |  25
name 3 |  26
name4  |  20
-------+------------
TOTAL     98
-----------------------
(here is the page footer)



Based from the table above i want to display the total for that page right after the last record on that page and not on all my data...

By the way im not putting them in a group... im just displaying all of the records in my database and sum up all the expenses and im displaying the sum of the expenses of every page.... Well i can achieve that using a footer but i dont want to use a footer since the location of the total will be displayed on the bottom part of the page. i want the total to be displayed right after the last record on that page.


How would i display the sum of expenses per page? meaning im getting the total for that page and not the total for the entire report....

Thanks in advance guys and more power
Posted
Updated 26-Nov-11 23:48pm
v2

1 solution

 
Share this answer
 
Comments
RaviRanjanKr 27-Nov-11 15:13pm    
Nice Collection of Links, My 5+ and Bookmarked it. :)
Madzmar25 27-Nov-11 21:16pm    
I have seen your links and i was intrigued about having a table footer... How do i put a table footer? Im using table control and i only know how to add page footer but i cant seem to find how to add a table footer... I read about it and when you have a table footer you can set the table footer to repeat every page... how will i achieve that
thatraja 27-Nov-11 21:24pm    
Check the 2nd link in my answer. Look at this image & see the Table footer Clickety
Madzmar25 27-Nov-11 21:31pm    
I still cant figure out where to click on the table to have a table footer... what i did was i dragged a table control onto my report body... now it only displays 2 rows. the first row is the header and the second row is the detail. but i cant see the table footer.. by the way im using visual studio 2010.
thatraja 27-Nov-11 22:35pm    
Did you see this image Right click the Table, you can find the things.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900