11 Replies Latest reply on May 17, 2012 5:35 AM by GuyStevens

    Auto height of row or field

    JUANDAVIDGIL

      Title

      Auto height of row or field

      Post

      I have been trying to have a layout where I print my products data sheet or a layout where I can see what different a costumer did get on a particular invoice.

       

      For the first, not all products have the same specs, some are very long, some others are very short, and for others, some costumers take many products, some buy just one.  


      Is there a way to accomplish this?

        • 1. Re: Auto height of row or field
          philmodjunk

          Yes there is. Do you use the standard table structure for invoicing. Something like?

          Customers---<Invoices-----<LineITems>-----ProductsAndOrServices

          Where you list individual items purchased on an Invoice via a portal to lineitems?

          If so, set up a list view layout based on the LineItems table. You can make the description field in the body of this layout several rows of text tall to accomodate the varying lengths of your descriptions and set the field to "slide up", "Resize enclosing part" on the position tab of the inspector.

          A script performed from the invoices layout can perform a find or use Go To Related Records to bring up the set of Line Items records for the current invoice.

          Here's a demo file with the above structure that uses this method for printing invoices:  http://fmforums.com/forum/showpost.php?post/309136/

          Key facts about sliding layout objects:

          1. It's only visible in preview mode and when you print/save as PDF...
          2. All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
          3. Objects in headers and footers will not slide.
          4. Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
          5. Fields will slide up only if Top, alignment is specified for it and will slide left only if left alignment is specified.
          6. Consistent side borders are difficult to achieve with sliding fields.
          • 2. Re: Auto height of row or field
            JUANDAVIDGIL

            I do have to add here, that your example has enlighten me, but it is not my solution, because,the description of the lineitems itselves are sometimes bigger and sometimes single lines... Alas, I think I will have to copy and paste from FM into a word document to do this part.  

            My bussines works with custom made products and quotes are a must.  Different countries cost me different values of money and so, I have to make a table to find out what will be the value of the product at the end.

            So every quote has different products.  Each product is made from different items on the price list (I use a join table ItemsFromPriceList) to add to each product. And I feed a description field on the ProductTable with a script that grabs the information from the PriceList and concatenates it with the description field in the product table.  Conclusion: the field can be small or pages long.

             

            Table Structure:
            Quote Table --> ProductTable --> ItemsFromPriceList --> Pricelist

            I have attached the description field of one of my products to see if there is a choice

            • 3. Re: Auto height of row or field
              philmodjunk

              I do have to add here, that your example has enlighten me, but it is not my solution, because,the description of the lineitems itselves are sometimes bigger and sometimes single lines... Alas, I think I will have to copy and paste from FM into a word document to do this part. 

              Not the case. You can make the field several rows of text taller than you think that you will need for the longest product description and set it to slide up/resize enclosing part.

              Exporting to Word IS an option to consider, however, as it can manage page breaks that fall midparagraph better than can FileMaker. (FileMaker can leave a lone line at the bottom or top of a page where Word can adjust the page break to avoid this.)

              • 4. Re: Auto height of row or field
                JUANDAVIDGIL

                Hello again.  I made a layout with your help.  Though Im not sure if its ok.  I have it in spanish, so translatiosn doesn always what it seems. My inspector looks like the attached file, but still my results are cropped, and those that are smaller do not resize either.  Look at my examples

                • 5. Re: Auto height of row or field
                  JUANDAVIDGIL

                  and here is the inspector

                  • 6. Re: Auto height of row or field
                    philmodjunk

                    You need to make the field larger. The field can shrink, but can't expand so you have to size the field to be at least as large as the largest possible description.

                    • 7. Re: Auto height of row or field
                      JUANDAVIDGIL

                      In the example picture, you can see that some are cropped, but some others have extensive gaps... it means is not slimming down.  I made another example here.  Dont know what I am doing wrong... Basically, in spanish the text from the inspector that I am using translates into english: 

                       

                      Erase White Space from

                      [  ] To left
                      [X] To top
                         (X) All objects above
                         ( ) Only objects directly above 

                         [X] Also change size for enveloped area

                      • 8. Re: Auto height of row or field
                        GuyStevens

                        Hey Juan,

                        Are you sure you are looking in preview mode. Because sliding doesn't happen in Browse mode.

                        I made you a little example:
                        http://dl.dropbox.com/u/18099008/Demo_Files/SlidingUp.fp7

                        Make sure you look at the print layout in Preview mode.

                        • 9. Re: Auto height of row or field
                          JUANDAVIDGIL

                          Yeah... Im pretty sure I am on preview mode.  Check it out

                          • 10. Re: Auto height of row or field
                            JUANDAVIDGIL

                            Here is how I set tup the layout for preview mode

                            • 11. Re: Auto height of row or field
                              GuyStevens

                              You shouldn't have a lot of white space under your field. Either enlarge the field to go all the way to the bottom of the body part.(best choice)
                              Or make the body part smaller so it's just under the field.

                              Sliding up