10 Replies Latest reply on Jun 7, 2013 2:51 PM by ethanmac

    Portal row height adjustment?

    ErikToh

      Title

      Portal row height adjustment?

      Post

           I need to get "Description of Goods" to show up as a multiline portal row so that it can be printed. What would be the best way to accomplish this? Thanks!

      Screen_Shot_2012-11-28_at_11.52.30_AM.png

        • 1. Re: Portal row height adjustment?
          davidanders

               Portal rows are a single size, if you need variable (sliding) heights in your data, instead of printing data from a portal, print from the table containing the data.

          • 2. Re: Portal row height adjustment?
            ErikToh

                 I know what you mean, but I just don't know how to do it! I'm such a noob. :(

                 Update: unless I'm reading the online help incorrectly, there doesn't seem to be a straightforward, built-in way to display the entirety of an arbitrarily long text field? surprise

            • 3. Re: Portal row height adjustment?
              philmodjunk

                   Take a look at the Invoices starter solution that comes with filemaker 11 or filemaker 12 to see how they print an invoice.

                   You set up a layout based on the portal's table and include fields from the invoice table in the header, footer or a grand summary part. THis allows you to put the description field directly in the body of the layout and make it large enough to display the largest description you might have. Then set this field to "slide up" and also to "resize" enclosing part. This sliding will not show in browse mode, but will show in preview mode or when you print or save as PDF.

              • 4. Re: Portal row height adjustment?
                ErikToh

                     I've set up my own database to mimic the "Invoices" starter solution, which, BTW, is also using a portal to show Invoices data. Which is exactly the problem I'm facing; there is no way that I'm aware of to show an arbitrarily long text field in FMP.

                     For the "Invoices" starter solution, let's say the "Item" field is 250 characters. Obviously it would need a line break or 3... which is fine on-screen since you can just click on the field and it expands accordingly. However all this falls apart when you need to print, which cuts off the text to whatever size was set in Layout mode.

                     I need it to work this way because a single Purchase Order can be arbitrarily long with tens or even hundreds of line items, each with detailed descriptions running into tens or hundreds of characters since part numbers are not globally unique (multiple manufacturers). This in itself is not the problem since they can go into the "Body" of the layout as you so kindly pointed out, but if the portal row can't be resized to automatically suit the length of the text field then all is lost.

                     Perhaps there's an alternate solution to this and I would be eager to learn it. Thanks!

                • 5. Re: Portal row height adjustment?
                  philmodjunk
                       

                            I've set up my own database to mimic the "Invoices" starter solution, which, BTW, is also using a portal to show Invoices data. Which is exactly the problem I'm facing; there is no way that I'm aware of to show an arbitrarily long text field in FMP.

                       But it does not use the portal when you print the invoice--which is why I suggested you look at its design to see how that was done.The starter solution changes to a layout based on the portal table and prints from there. The fields in that print layout can be resized to be several rows of text tall and then the sliding fields options can be used to set them to slide up and to resize the enclosing part. This will shrink the rows of data down to fit the text in the field.

                  • 6. Re: Portal row height adjustment?
                    ErikToh

                         PhilModJunk, I really appreciate the response. But it seems we are on different frequencies. I understand what you're saying, but I'm not sure if you understand my problem.

                         In Layout mode, adjusting the Body layout part to fit the entire multi-line Item field will work as you kindly pointed out. But how do I know how tall the field is going to be just prior to printing? I do not wish any part of the Item field to be truncated; it has to be shown in its entirety. And it can be arbitrarily long.

                         I suppose the naive way would be to write a script that calculates the length of the field given the font size and kerning/spacing of its contents, but then I would have to deal with word wrapping, and I'm not sure it's a problem for me to solve.

                    • 7. Re: Portal row height adjustment?
                      philmodjunk

                           You have to size the field to be larger than needed for the largest possible description. I wish we could set fields to "grow" and not just "Shrink" but that is not an option. Please note that you can make this field 20, 30 lines of text tall and it will still shrink down to fit the text in the field.

                      • 8. Re: Portal row height adjustment?
                        ErikToh

                             Maybe I'll submit it as a feature request. Thanks for the reply!

                        • 9. Re: Portal row height adjustment?

                               Sorry, Im still not sure here of the final answer... Even if fields themselves can shrink, you cannot make the "body" of the layout to shrink the same way and thus follow the field's height to make it clean and neet... so even on that invoice print layout (list view & preview mode) regardless of the field shrinking aspect you'll always be limited with the body's height being one size for all records...  

                               please tell me I'm wrong!?!

                          • 10. Re: Portal row height adjustment?
                            ethanmac

                                 Vince, I'm glad to tell you you're wrong.

                                 You absolutely can make the body of the layout shrink by placing an oversized text field (or merge field, which is my usual preference) in the layout, and making sure that the body is large enough to contain it.  

                                 in the properties inspector, under sliding and visibility, make sure the field is set to "slide up" and that "also resize enclosing part" is selected.

                                 then you should have no trouble printing varying height parts: