Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6590 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I'm trying to create a count of pages in a footer that displays as "Page x of y" so that if there are 10 pages and page 2 is being previewed, it displays "Page 2 of 10." I've set up a calculation field called "PageNum" to Get(PageNumber) and another calculation field to Count(PageNum) but when I enter preview mode, all the pages display "Page 0 of 1." Any idea how this can be implemented correctlly?

Thanks!

Posted

You are making this way too difficult. You need a global number field LastPageNumber, a script that takes you to the preview mode and then goes to the last page and use the Get (Page Number) function to set the value of LastPageNumber.

On the layout use Insert - Page Number Symbol (##) and add text to look like this ## of LastPageNumber.

Posted

So I would assemble this by creating a script that goes to the preview mode and to the last page, then the LastPageNumber will get the page number... But how can I do this without having to run the script every time I want to print?

Thanks

Posted

I would make it part of a Print script and use a button to run this script. I expect that you have to do a number of things prior to printing which could also be included in the script.

Posted

Hi RalphL - I like the script suggestion. I'm just not sure how to incorporate the Get (Last Page Number) in the script. Also, am I correct that the script should be able to run from a button that only appears on a single layout?

Posted

rsglewin,

Basically as Ralph was suggesting, in your script to go to preview mode or print etc, just sets these steps.

Enter Preview Mode []

Go to Record/Request/Page [Last]

Set Field [gReportPgs; Get ( PageNumber )]

Go to Record/Request/Page [First]

If you want it to print, then you can have it pause in preview mode again and then run a print step.

Enter Preview Mode []

Go to Record/Request/Page [Last]

Set Field [gReportPgs; Get ( PageNumber )]

Go to Record/Request/Page [First]

Enter Preview Mode [Pause]

Print []

Posted (edited)

I think I follow, but perhaps I'm more of a novice than I thought. =) In the Set Field step, what is the gReportPgs; Get (PageNumber) step is [Table::Field;Get (PageNumber), right? This seems to work. However, the script pauses before the print step but doesn't print... What am I missing?

Edited by Guest
Posted

gReportPgs is a global field that you have to create. This global field will be set to the last page number.

That is how you get page n of xxx

Furthermore, I added a pause step if you want to show a preview of what hte report will look like to the users. you do not have to have a pause step in here. Once paused, you can hit the continue button in the status area (left hand side) to continue the script and print.

  • 1 year later...
Posted

Happy New Year everyone!

Not to resurrect an old thread and all but something here wasn't quite answered.

How would I get the page x of y to restart page x at 1 for each record?

Right now I have it and when I do my find and say 10 records come up each with different number of pages being printed for each, the page x keeps counting up.

If record 1 had 3 pages and record 2 had 2 pages and record 3 had 4 pages by the time I hit page 1 on record 3 it reads

Page 6 of 4

How can you have a page 6 of 4?:D

I'm sure there's something easy to fix this I just haven't found it yet. Any help would be appreciated.

thanks in advance

Posted

acantho,

This thread is not the correct thread. I am assuming that you were referring to this thread.

This topic is 6590 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.