Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.filemaker > #2926

Re: Page count in joined layout.

From Helpful Harry <HelpfulHarry@BusyWorking.com>
Newsgroups comp.databases.filemaker
Subject Re: Page count in joined layout.
Date 2017-11-24 13:51 +1300
Organization Aioe.org NNTP Server
Message-ID <ov7qds$1tp8$1@gioia.aioe.org> (permalink)
References <1nfyawe.joyo741iu57gkN%borgobello-NO@SPAM-alice.it>

Show all headers | View raw


On 2017-11-23 15:46:31 +0000, Aladino said:

> I'm trying to make a joined print from tow layouts, because I need to
> join two body section that can be repeated more times each (list views).
> To explain, my print should be composed:
> 
> Header
> Leading grand summary
> body 1 - repetition 1
> body 1 - repetition 2
> body 1 - repetition 3
> body 1 - repetition ...x
> body 2 - repetition 1
> body 2 - repetition 2
> body 2 - repetition 3
> body 2 - repetition ...y
> Trailing grand summary
> Footer
> 
> I think the unique way to get this with FileMaker is to join two layouts
> with a printing script. The problem is that my customer wants the pages
> will be numbered in an unique count, for example:
> page 1 of 8
> where 8 is the sum from the two layouts pages count.
> Note that each body repetition has a variable height.
> So, I found how to count the pages, opening both layouts in preview
> mode, but now I can't find how to number pages from second layout...
> 
> In the first layout I have:
> {{PageNumber}} of $$TotalPages
> 
> but in the second, I need something like
> $$Layout1Pages+{{PageNumber}} of $$TotalPages
> 
> but I didn't find how to do. Someone had the same need, or in any case,
> knows how to solve this problem?

You can't do calculations on a Layout itself.

I haven't tried it, but you /might/ be able to use a Calculation Field 
to calculate the page number:

    c_SecondLayout_PageNum = Get(Page Number) + c_FirstLayout_TotalPageNum

and the Script would have to calculate the value of 
c_FirstLayout_TotalPageNum, by going to the first Layout, entering 
Preview Mode, and then going to the last page to grab the last page 
number.
i.e.
     Go To Layout [FirstReport]
     Enter Preview Mode [Pause : Off]
     Go To Record/Request/Page [Last]
     Set Field [c_FirstLayout_TotalPageNum; Get (Page Number)]

Of course, to get the "Total Pages" value you already have to do this 
on both report Layouts.*

But I'm not sure the c_SecondLayout_PageNum field will actually display 
the correct number in the Footer part of the second Layout.


You may instead have to use a Script to separately print each page of 
the second Layout, adjusting the "page number" as it goes.


A better way would probably be to use a separate "Report Table" that 
gathers all the appropriate data and can do the report as normal, with 
one Layout and one Body part.


Depending on the data and the structure of the database, another option 
might be to use Sub-summary parts instead of Body parts. You may need 
to create separate relationship links for each repetition though, which 
would be a problem if a parent record can potentially have an unlimited 
number of related child records.


If the Body 1 and Body 2 data is coming from the same child Table, then 
you may be able to print the report from there using Sub-summaries and 
appropriate sort orders (obtaining the Parent record data via a reverse 
Relationship).



* A Word of Warning:
Preview Mode does not always display the same as what actually gets 
printed. You may find that sometimes the printed report has more or 
fewer pages than displayed in Preview Mode. It seems to be caused by a 
slight variation in font display and print technologies which can 
sometiems cause text to be flowed differently on the two output 
devices. It's a problem that has affected FileMaker Pro for MANY 
versions and across operating systems. I haven't checked the newer 
FileMaker Pro versions specifically (it's difficult to replicate 
consistently) to see if it has been fixed ... but I doubt it.  :o(


Helpful Harry  :o)

Back to comp.databases.filemaker | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Page count in joined layout. borgobello-NO@SPAM-alice.it (Aladino) - 2017-11-23 16:46 +0100
  Re: Page count in joined layout. Helpful Harry <HelpfulHarry@BusyWorking.com> - 2017-11-24 13:51 +1300

csiph-web