rezdragon Posted April 26, 2005 Posted April 26, 2005 OK, here is a question, about page numbering. I have a layout for printing customer bills. Now with some of the records the accounts slip to a second page or even a third page and id like to make it say 1of3 2of3 3of3 depending on how many pages the file is going o need to print. Any ideas on how this could be accomplished?
efen Posted April 26, 2005 Posted April 26, 2005 see this post: http://www.fmforums.com/threads/showflat...true#Post156035
BobWeaver Posted April 26, 2005 Posted April 26, 2005 That method works if you are printing each customer's bill as a separate report. If you want to print all customer bills at once as a single report, it gets more complicated.
rezdragon Posted April 27, 2005 Author Posted April 27, 2005 yes actually, i want to be able to have a multiple report find, and be able to print a few invoices at once displaying the page numbers at the top
BobWeaver Posted April 27, 2005 Posted April 27, 2005 Then you will need to figure out how many records will fit on a page and then use that to determine the number of pages. You can use a couple of summary fields and some calculation fields to do it. Global field: gRecordsPerPage, the number of records (line items) that will fit on a page Summary field: sCount: count of CustomerNo Summary field: srCount: running count of CustomerNo Calculated field: cPages = Div ( GetSummary ( sCount ; CustomerNo )-1 ; gRecordsPerPage )+1 Calculated field: cRecordNo = Get ( RecordNumber )+(GetSummary ( sCount ; CustomerNo ) - GetSummary ( srCount ; CustomerNo )) Calculated field: cPage = Div ( cRecordNo-1 ; gRecordsPerPage )+1 cPages gives you the number of pages for the current customer cPage gives the current page number cRecordNo gives the number of the current record for the customer (resets to 1 when the CustomerNo changes). You can put cPage and cPages in the header or footer, and they will show the current page and page count.
Recommended Posts
This topic is 7151 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now