3 Replies Latest reply on Feb 19, 2014 9:12 AM by philmodjunk

    Print layout using variables



      Print layout using variables



           In a layout dedicated for printing only (the information here can be printed or exported as a PDF) I want to print only information from fields that have been filled out.

           Initially I had something like

           Name: <<Users::Name>>

           Age: <<Users::Age>> 


           Unfortunately with this situation if the age is not filled out the heading "Age:" is still being printed.

           I tried a script where variables are set to represent this information, using the "case" argument:

           $$Age = case ( Not isEmpty( Users::Age ) ; "Age: " & Users::Age; "" )

           and the layout is made up of these variables. The script now takes over a minute to execute where it used to take only seconds (2-5 seconds) before. As you can imagine this is not ideal, can anyone suggest a work around for this?

           Filemaker Pro Advanced 11 (latest version) on windows and mac

           FMS 11

        • 1. Re: Print layout using variables

               In your example:

               Name: <<Users::Name>>

               Age: <<Users::Age>>

               If Name and Age are not part of the same text block, you can use conditional formatting to hide the text when the fields to the right are empty. One way is to set the text color to match the layout back ground. In FileMaker 13, you can use the new "hide when" setting. Or you can use conditional formatting to set the font size to a very large size such as 120+ points to make it disappear.


               You can define calculation fields:

               If ( Not Isempty ( Name ) ; "Name:" )

               and use them for your field labels.

          • 2. Re: Print layout using variables

                 Thanks for your reply Phil,

                 Depending on the amount of information that is filled out the print out can be up to 3 pages long, the layout currently has only 1 tet block with all the information on it so the first idea wont work.

                 I thought of using multiple text block and using the "slide up based on objects above" feature to remove any blank spaces since I dont want to end up with 2 empty pages for records that do not contain lots of information but conditional formatting will only blend the objects into the background not remove them leaving me with lots of white space.

            • 3. Re: Print layout using variables

                   You'll need to use the calculation fields for your field labels with them (and the data fields) set to Slide up and Re-size.