4 Replies Latest reply on Jun 26, 2012 6:24 PM by robwoof

    Excluding pages from a layout when printing.


      Hi all I need your help.


      I have wrttien a database which I will be using to carry out property inventories.


      It works great and saved me shed loads of time.


      However the way I am printing the reports is far from efficient.


      The properties I am visiting of course will have different rooms some 1 bed some 2 bed and so on.


      But when I go to print it I have created several layouts for each combination, what I would really like to do is have one layout showing all the rooms then when I print exclude certain sections of it.


      So if it only as one bedroom in only prints the sections of the layouts relating to this.


      But I can't find a way to do it.


      I really hope I have explained this ok.

        • 1. Re: Excluding pages from a layout when printing.



          Details matter a lot here. So my reply must be tentative.

          However, I really do know what you're talking about. I also heavily miss the option to decide whether a layout element will be printed for a certain record or not via a calculation field.


          I developed a database where the printed records have highly variable characteristics (just as your properties do) and, thus, need to be printed on varying layouts, even though they all belong to the same table. In my case the variablity highly depends on the contents of the tables connected to the table the printed records belong to.


          The easiest approach is to use the "Sliding & Visibility"-properties on the "Position" tab of the inspector. If it is possible to leave the fields for additional, unneeded properties empty, you can have these fields collapse by setting their "Remove blank space by..." sliding left/sliding up properties. As soon as you have portals, additional titles, other text elements or graphical elements, etc. in your print layouts it gets more and more difficult to use this approach and still get an acceptable result.

          Hence, this approach is not very helpful in many cases.


          What I used in my solution, is a rather complicated script that produces a PDF file composed of dozens of smaller PDF files. So I use the "Save Records as PDF[]" script step in a loop and tick the checkbox "Append to existing PDF". In every iteration of the loop I choose the appropriate print layout for the specific record (or set of records, in my case). The creation of these PDF files can take VERY long (5+ minutes) if the page number is large.

          Obviously, this solution is not REALLY elegant. I'm not very happy with it but it was the only one I got to work in my solution within a reasonable time frame.


          If you want a near-perfect solution, you need to jump through many hoops.

          You could use LaTeX ( http://en.wikipedia.org/wiki/LaTeX ), which is a text markup language.

          There are poeple in the FileMaker community, who generate LaTeX code from within their FM application and then invoke external LaTeX software to generate really nice-looking PDF files. But this is really a LOT of work and only makes sense if your solution needs to live up to professional standards.


          In my opinion your post mentions one of the critical shortcomings of FileMaker that every developer comes across sooner or later as his/her solutions grow more sophisticated.

          A calculated switch to print or not print every element would be highly desirable. I also long for a way to resize and reposition elements on a print layout based on calculations and/or CSS properties.


          I hope this helps... at least a little bit.

          • 2. Re: Excluding pages from a layout when printing.

            Hi Martin,


            There are several ways to show and hide things on your layout.


            You could mask the portions you don't want (but if these portions contain text and you use save as pdf, these texts are still selectable)

            You might be able to use calculations to show and hide portions of the layout.

            You can use a valid or invalid relation to show or hide portions of the layout.


            If you provide some examples I might be able to give you a better solution.


            Best regards,


            Ruben van den Boogaard

            Infomatics Software


            • 3. Re: Excluding pages from a layout when printing.
              Stephen Huston

              Another approach would be to place Rooms in its own table, and relate rooms to properties. Then do your printing from the Rooms table and you would only get existing Rooms when printing.

              • 4. Re: Excluding pages from a layout when printing.

                Hi Martin,


                Another option is to have the various sections set up as subsummary parts in the report. If a subsummary's "sort by" field is not in the sort order, then it does not appear.


                If your found set is a single property, sort by record ID (or similar), and then by whichever other fields correspond to the sections you require to be visible. You then need a separate sort order defined for each combination of required sections.


                I hope this helps.