I suggest describing how you determine pagination in more detail.
Not only will this help us help you, but I'm also curious to see how you do that.
I was afraid you were going to say that. I'll do my best!
First we start with a page ID. This ID travels with the spread (which are two pages together) throughout the process. Each person knows which file needs what work based on page ID. The pagination includes this page ID as well a description of the page. These are the main components of the page ID and pagination:
* The media code (which is our "name" for the book) - for example 2W
* The category number(s) which indicates which products or stories go on that spread - for example category 33 is women's knits, 34 is men's knits.
* The year of the publication - for example 09
* The sequence of the page - if there is more than one page for these knits then it would be 1A, 2A, etc.
* Description - a brief description of what is on the page - for example Men's and Women's Knit Tees
* Page number - 1, 2, etc.
So the page ID looks like this: 33_34_2W09_1A (on the left side) and 33_34_2W09_2A (on the right side) - note that not all of the information stated above is included in the ID but it is included in the pagination.
Once an individual puts this information in the pagination form FileMaker automatically plugs it into a pagination. So the pagination for the information above would look like:
Pg ID Description
1 33_34_2W09_1A Men's and Women's Knits
2 33_34_2W09_2A Men's and women's Knits
3 XX_XX_XXXX_XX Information
4 XX_XX_XXXX_XX Information
Many of our books have as many as 120 pages. I need some way to automatically indicate the center of the book. In our current process it looks like this:
---------------------------------Center of Book--------------------------------
But it could also just be a highlighted line. Anything to make it stand out. My initial thought was to do a calculation that gave the first half of the book a letter A based on the page number and the second half of the book a letter B and then doing a sub-summary to break after the letter A. But I am open for anything!!
Please let me know if you need more explanation. I didn't want to get too technical.
"But it could also just be a highlighted line. Anything to make it stand out. My initial thought was to do a calculation that gave the first half of the book a letter A based on the page number and the second half of the book a letter B and then doing a sub-summary to break after the letter A. But I am open for anything!!"
I see a field that stores the page number for each page of the book in a table where 1 page equals 1 record. That makes this something we can do.
- Define a summary field to be the maximum of your page number field, let's call it "MaxPages". (With the right relationship, you could also use the Max() function.) This summary field will return the total number of pages correctly as long as the found set consists of all the pages for one book.
- Define a calculation: If(PageNumberField < MaxPages/2, "First Half", "Second Half")
- Create a sub-summary part that is visible when sorted by the above calculation field and put this field on your sub-summary part.
- Enter browse mode and sort your records first by this calculation field, then by the page number field.
Performance note: the above fields are unstored and cannot be defined as stored. The sort operation will thus take much longer than it would when sorting on a stored field, but it will work. If the performance delay is unacceptable, you may have to write a script that captures the page number count and stores MaxPages or MaxPages/2 in a number field in every record instead of using a Summary or Max() calculation field.
Older version note: If you are using FMP 9 or older, sub-summary parts are invisible until you print or preview the layout.
Can you tell me how to make the sub-summary visible? I do have FMP 9 so I know it won't show up until preview, which is fine. But it isn't showing up at all. I do have that calculation field in the sub-summary area.
The sub-summary part will only be visible if your found set is sorted on the field you selected as the sort field when you created the layout part.
To check to see what field was selected, enter layout mode and double click the layout part label of the sub-summary part. You'll see the "Sub-summary when sorted by" radio button is selected and the name of a field will be highlighted in the field list. Make sure you sort your records on that field. (You can sort in any order and include any other field as long as the specified field is included somewhere in the sort order.)
Ok, the calculation works fine, it is sorting correctly, all seems well.
How do I make it look like this
CENTER OF BOOK (is it possibly to make this sub summary a red bar and then I can add text to it that says CENTER OF BOOK?)
Is this possible?
P.S. I am out of the office Friday and Monday but I'll check back on Tuesday and look forward to any suggestions. Thanks!
Change the calculation: If(PageNumberField < MaxPages/2, "First Half", "Second Half")
to If(PageNumberField < MaxPages/2, "", "CENTER OF BOOK")
Place the above calculation field in your sub-summary part, resize it to be a very wide field.
Use conditional formatting to turn the fill color to red if: Self = "CENTER OF BOOK"
Click this field and use Format | Set Sliding/Printing to set the field to slide up and shrink the size of the enclosing part.
The last feature should shrink the extra sub-summary part at the beginning of your report, though the shinking will only be visible when you print or preview the report.
As always, you continue to amaze me. One small hurtle though. I have multiple sub-summaries now, after ever page that is in the second half of the book. Is there a resolution for this?
FYI, I tried to change the calculation to = MaxPages/2 but that didn't work. For some reason it put it after every page.
I got it!!! The calculation is If (PageNumberField = MaxPages/2, "Center of Book" )
Couldn't have done it without you Phil!!!
I just realized that a sub-summary part will not show up throw web publishing. Can you think of any other way to get this "center of book" to show up? For instance, is there a way to format a certain record?
The work around to get sub summaries into a web published format is to export your records to a temporary table and insert the sub-summary info as a separate record. If you set up your sort correctly, this "dummy" record will appear in the middle of your pages to mark the book's center.
I was thinking about using conditional formatting. For example:
Page number = Max pages/2 or Max pages/2+1 - then those two records will be bold. That way they can still see the center of the book is between those two page numbers.
I don't do a lot with IWP, so I'll have to defer to others as to whether or not conditional formats are visible in the layout is published to the web. If they are, then it sounds like you have a much simpler solution than what I suggested.