Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi all,

have stumped myself trying to figure out an accurate way to script page #s with columns conatining fields that slide up and reduce the size of the enclosing part. Without sliding, I just script or calculate the # of records visible per page, and divide the total number of records by that. however, when the # of records per page can vary depending on the sliding (amount of text in field), this no longer is an accurate method. anyone encountered this problem before?

Thanks

Posted

Why not use FMP's built-in page numbers in the footer or header?

For total number of pages, create a global field (let's call it gLastPage) and perform this script:

Enter Preview Mode []

Go to Record/Request/Page [last]

Set Field [gLastPage, Status(CurrentPageNumber)]

You can then enter browse mode again or return to the first page and let the user preview the document.

Of course the gLastPage field should be on the layout.

Posted

Thanks for the reply.

Was not clear first time. I do use the ## for page numbers, but am looking for the total page numbers- the X from "Page # ## of X". yes, can use the status function and global field, but this gets complicated in the scenario I would like to use it in (also happens to be the scenario I forgot to mention the first time around...) 1. Am trying to print hundreds of invoices at one time. 2. have the layout set out it all looks great with one find and one sort. 3. have the individual page numbers working fine 4. have to run script

[find all invoice items for customer1, sort, enter preview, status(currentpagenumber) to g_TotalPages, replace n_TotalPages with calcresult(g_TotalPages), find customer 2...]

to get the freakin total page numbers set. I am just a bit miffed because the most complicated process of the whole database is setting the page #s. Has anyone encountered a better way to do this? perhaps using a summary w/ selfjoin or womething? would be great if they could have a running count of page #...

sorry for unloading, but does anyone else think that this is unusually complicated for a program that is usually quite elegant? (or am I missing something obvious again?)

Thanks!

Posted

Vaughn's reply was your answer.

Create a global field (Total Pages) g_pages

Enter Preview Mode

Go to Record/Request/Page

[ Last ]

Set Field [ g_pages, Status( CurrentPageNumber) ]

Go to Record/Request/Page

[ First ]

In the footer of your report you would show ## of g_pages

Posted

I use the method shown by Vaughn and it works great regardless of whether the fields are sliding or fixed. However, all the reports I have done this on are "one timers." And I might be misreading uchujin's message but it sounds like there is a need to repeat this process several times. For example, a 50 page report that has five 10-page subsections where each subsection needs this style of numbering (e.g. there would be five page 8 of 10's). Is this what you are looking for, uchujin? (Not that I know the answer! confused.gif )

Posted

Thanks Bob,

you nailed the problem on the head. I suppose it is not so much a problem as a frustration, as I am able to make it work using the methods described above, but am dismayed that I have to find each subset and number it as a "onetimer". I was wondering if there is a more elegant way to do this. I suppose, however, that this is just griping now as there does not appear to be a better way.

Thanks for everyones interest though!

This topic is 8189 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.