September 14, 201114 yr Hello, I am using Filemaker Advanced 10. I have a script listed below that shows page # of # on the footer of each record in form view. Each record varies in length depending on the amount of text included in each record. This script works fine if you print one record at a time. I want to print multiple records at once and set the correct page number for each record starting with 1 and ending with the correct number of pages per record. The script below shows the footer page 1 of the total of all pages instead of each record. Freeze Window Go to Layout [ “K-9 Reports Print” (K-9 Reports) ] Enter Preview Mode Go to Record/Request/Page[ Last ] Set Field [ K-9 Reports::gnumberpages; Get ( PageNumber ) ] Go to Record/Request/Page [ First ] Print [ ] Enter Browse Mode Set Field [ K-9 Reports::gnumberpages; "" ] Go to Layout [ “K-9 Reports” (K-9 Reports) ] I would appreciate any help you could give me.
September 14, 201114 yr You are setting the last page number, rather than the current page number, for every page?
September 14, 201114 yr ... shows page # of # on the footer of each record in form view. Each record varies in length depending on the amount of text included in each record. This script works fine if you print one record at a time. Please clarify ... form view?
September 14, 201114 yr Author Efen, I changed the last page number to the current page number and this gives me the correct page number, but it does not give me the correct last page number of each report. I thank you for the first obstacle accomplished, but I believe there must be a way to show the last page number (total pages in report).
September 15, 201114 yr On your footer insert the current page number symbol and your gnumberofpages field such as: Page # of <<gnumberofpages>>
September 15, 201114 yr The reason I asked if it was form view is because the 'page number' will always be the record number. "there must be a way to show the last page number (total pages in report)." You should be using a list layout instead of a form layout. You can set it to new page break before every occurrence of the primary key. List layouts allow fields to reduce if they take less space. But you have given us nothing about how you have the report set up. It would help if you could create an empty clone, zip and attach your file. As an aside, if you see that your copy/pasted text is smaller than other text here, please increase the font size (the script itself was nearly impossible). Some folks have trouble reading text this small. As you will notice, I wear glasses but not everyone does. ;-)
September 15, 201114 yr The reason I asked if it was form view is because the 'page number' will always be the record number. Not necessarily. If the body part is several pages tall, and objects are set to slide up, then each record can occupy a different number of pages. This script works fine if you print one record at a time. That's probably the best way to go about it: print each record in a loop.
September 16, 201114 yr Author LaRetta, The form view report layout extends 10 pages long and the text field enclosed is set to sliding and reduce size of the enclosed part. It seems like this should be a very simple thing to accomplish but after reviewing previous posts, it is not. I am not an expert and was simply looking for advice.
September 16, 201114 yr Hi Steve, If I sounded judgmental, I was not feeling so. It just seemed unusual. Form layouts (at least for me) are designed to fit a monitor screen with no scrolling. I don't think I've ever printed one (except for software documentation) and I had difficulty visualizing what you wanted. "I ... was simply looking for advice." Of course, that is (almost) a given when someone starts a new post. And I was only looking to assist. :smile:
September 16, 201114 yr In order to produce a report that has a footer page # of # total pages, and you wish the total page count to "restart" for each record, then the report can only include one record. So, as comment suggested, you need to loop in order to click a button and produce more than one report at once. pseudo code: Create a found set Loop Perform script "Print Report" go to next, exit after last End Loop
September 16, 201114 yr Yes the the Report layout should Restart the pagenumbers after each 'Body' The pageNumbers field is a normal Number field in the table ( no global storage!!) And the print script would look like: Go to Layoput [ "RPT Standard Form” ] Enter Browse Mode Go to Record/Request/Page [ First ] Loop New Window [ Name: "temp"] Show All Records Omit Record Show Omitted Only Enter Preview Mode Go to Record/Request/Page [ Last ] Set Field [ table::pageNumbers; Get ( PageNumber ) ] Close Window [ Name: "temp"; Current file ] Go to Record/Request/Page [ Next; Exit after last ] End Loop Print [ ] This way the user will only be presented with the Print settings once.
Create an account or sign in to comment