Click here to Skip to main content
14,392,174 members
Rate this:
Please Sign up or sign in to 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...
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
Updated 27-Nov-11 0:48am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
Madzmar25 27-Nov-11 23:20pm
yes i found it thanks a lot thatraja... i was looking for that repeatonnewpage property... so i really need to put a group to my details for me to be able to achieve what i want... on my previous report i didnt put any group since i was thinking that i dont need a group for that one but the problem without using a group is that i cannot place the total on every page.. but with the use of group footer i can display it on every page thanks a lot...

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100