7 Replies Latest reply on Mar 10, 2017 2:40 PM by JohnTennock

    Auto-resize fields or portals

    JohnTennock

      I'm doing an FMPro12 application that requires a fairly conventional invoice form. I'm using a portal to display the invoice line items. It is possible that some line items will have multi-line text. Is there a way for the line height to grow automatically to accommodate multi-line text when the form is printed?

       

      Likewise, sometimes the number of lines will be more than will fit in the portal. Is it possible to have the portal to grow to accommodate the extra lines when printing?

       

      The portal scroll bar is Ok on screen but not when printing.

       

      Any suggestions appreciated.

       

      Cheers,

        • 1. Re: Auto-resize fields or portals
          Philip_Jaffe

          If your goal is to produce a printed layout, you should design your layout based on the table occurrence on which your portal is based.  Then you can use slide left/slide up object behavior to accommodate multi-line text blocks.

           

          While it is possible to use object anchors to control the behavior of a portal (to either make the row height larger when the screen gets taller, or to add more visible rows), this can not be done on a per-row basis.

           

          What is your ultimate goal?  Printing, or Screen?

          1 of 1 people found this helpful
          • 2. Re: Auto-resize fields or portals
            JohnTennock

            Thanks Philip,

             

            My priority is that the printed layout should accommodate multi-line fields in the portal, and that the portal should accommodate a variable number of lines without any details being hidden.

             

            I don't quite understand "you should design your layout based on the table occurrence on which your portal is based". Could you please clarify that?

             

            Cheers,

            John T

            • 3. Re: Auto-resize fields or portals
              Markus Schneider

              Your portal is based on another Table (table occurence..). To print proper, go to that table occurence and use a layout based on that TO.

               

              Create the layout, use data from the 'main' TO (thats the one where You placed the portal) if needed

               

              You can use the 'go to related record' scriptstep to navigate to the print layout. You can have the fields slided up in the print layout - so You can have multi line records, etc.

              • 4. Re: Auto-resize fields or portals
                Philip_Jaffe

                It's almost never a good idea to use portals in a print layout, for many reasons.  The most obvious of which is that you will only be able to print the visible rows.  What if your portal has 20 related records, but the portal is only tall enough to display 10 rows at a time?

                 

                Instead you should design a layout which is based on the same table occurrence that your portal is based on.  For example, lets say you have a layout based on a table occurrence of the INVOICE table and the portal on this layout is based on the table occurrence of the LINEITEM table.  Make your print layout based on the LINEITEM table and display the lineitem records in a list view.  You can then use the slide left and/or slide up print controls to automatically re-size each row depending on the content of your fields.

                • 5. Re: Auto-resize fields or portals
                  JohnTennock

                  OK Thanks I think I get that.

                  So, I use the layout header and footer for the header and footer fields and table view for the line items. I'll explore that.

                  Thanks for your help.

                   

                  Cheers,

                  • 6. Re: Auto-resize fields or portals
                    Philip_Jaffe

                    No.  Not table view.  List view.

                     

                    I would really suggest you read through, at the very least, Filemaker Training Series Basic ( a free download from Filemaker ) before you get too deep into your project.

                     

                    FileMaker Training Series | FileMaker

                    • 7. Re: Auto-resize fields or portals
                      JohnTennock

                      OK, Thanks for the tip. I've downloaded the Filemaker Training Series Basic as you suggested and will have a go at the Advanced once I have worked my way through the Basic.

                       

                      Cheers,