By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

Force Page Break

P: 76
Hello,

I have a report that returns a varying number of dollar amounts, depending on the date criteria that is entered. What I need to do is force a page break after 32 records and sum those 32. The next page should have remaining records up to 32 and sum those seperately from records on page one. What I've tried doing is putting a text box with =sum([amount]) in the page footer, but that gives me an error. Is there any way that I can do this? Please let me know if any additional information will be helpful.

Thanks,

Charlie
Dec 1 '06 #1
Share this Question
Share on Google+
7 Replies


NeoPa
Expert Mod 15k+
P: 31,402
You can arrange when to throw a page after designing the report by changing the bottom margin.
TextBoxes on reports have the property, Running Sum, which should allow you to keep the running total you need.
Dec 1 '06 #2

P: 76
Thanks for your response.

I already have adjusted the margins to ensure that 32 fit onto a page, but the problem that I'm having is summing them. If, for example, I have 66 records, I want page 1, which has the first 32, to be summed. I then want page 2 with the next 32 records to be summed. Page 3 should have the remaining 2 records summed. The sum of one page shouldn't take into account records on other pages.

I'm not sure what you mean by the running sum comment. I changed the running sum characterization, but that gave me strange numbers. Is it possible to put the sum in the page footer? I tried this before and got an error, but is there anything that I can do to make that work?
Dec 1 '06 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Thanks for your response.

I already have adjusted the margins to ensure that 32 fit onto a page, but the problem that I'm having is summing them. If, for example, I have 66 records, I want page 1, which has the first 32, to be summed. I then want page 2 with the next 32 records to be summed. Page 3 should have the remaining 2 records summed. The sum of one page shouldn't take into account records on other pages.

I'm not sure what you mean by the running sum comment. I changed the running sum characterization, but that gave me strange numbers. Is it possible to put the sum in the page footer? I tried this before and got an error, but is there anything that I can do to make that work?
=Sum([Amount]) in the page footer should do what you want.

Is Amount the name of the control in the detail section with the amount to be summed or is it just the field name.

Is it a calculated field. You cannot sum a calculated field.
Dec 1 '06 #4

P: 76
Thanks for the response.

I tried putting it in the page footer again and it still isn't working. It gives me #Error. I know that the box works, though, because when I put it in the report footer, it works. Unfortunately, that doesn't sum the single page's data, it sums the multiple pages.

Also, Amount is the name of the control in the detail section and it is not a calculated field. Any other ideas? I'm completely stumped on this one.
Dec 5 '06 #5

NeoPa
Expert Mod 15k+
P: 31,402
Have you tried using the Running Sum property (on a non-showing field if necessary) in the detail section?
Dec 5 '06 #6

P: 76
The running sum works, but it will carry over to the next page. What can I do to make the running sum stop after the values on the first page and restart at 0 on the second. Also, is there a way to only make the last number in the list appear rather than have all the numbers?
Dec 5 '06 #7

NeoPa
Expert Mod 15k+
P: 31,402
This is where things get difficult as I don't know off the top of my head.
I was thinking along the lines of having a running sum AND a total field and doing a calculation using both to determine each page's sub-sum.
You can hide the field by leaving its .Visible property cleared but, if that means you can't refer to it you need to be a bit more inventive (maybe make it with white font and/or very small).
Dec 5 '06 #8

Post your reply

Sign in to post your reply or Sign up for a free account.