6 Replies Latest reply on Jan 23, 2016 2:32 AM by jrenfrew

    Format common invoice to fill page?

    JeffJ

      Thanks to all who have helped previously. After looking through many discussions, particularly in the reporting area, I find no advice on what must be a common issue. I have an invoice layout that includes a header with boiler plate text and data from the current record, a body that shows data from related line item records, and a trailing grand summary the displays totals and more boiler plate text. Currently the invoice "spacing" is mostly dependent on how many related line items are linked to the invoice. How can I setup a layout that displays roughly the same "spacing" whether there are two related line items or ten, and how can I get some of the boiler plate text to appear at the bottom of the printed page regardless of the size of the other layout parts or number of related line items? Thanks

        • 1. Re: Format common invoice to fill page?
          jrenfrew

          Header  -fixed size

          Body - fixed size

          Footer fixed size

           

          In the body put a portal to the related line items and then make it have one more row than you might normally expect to have on an invoice

          That way the footer stays at the same position on the layout.

          If you want to show subtotal, tax, delivery and total in a fixed position make that in a trailing grand summary part.

          • 2. Re: Format common invoice to fill page?
            JeffJ

            Thanks for the reply. I will try the portal idea. That may be the key.

            • 3. Re: Format common invoice to fill page?
              JeffJ

              I tried the portal idea that jrenfrew brought up and it works to a certain extent. When I show the layout in preview mode it now displays all the records in the found set along with a portal for each set of related records but one grand trailing summary. Similarly, when I print it defaults to "Records being browsed" and has to be changed to "Current record" to print correctly. In either case, when it is restricted to the current record, it previews and prints correctly. That leaves me with two issues:

               

              How can I show just one record in preview without losing the current found set, or alternately, how can I return to a found set after restricting to current record?

               

              How can I set the print function to default to "Current record" rather than "Records being browsed"?

              Thanks All

              • 4. Re: Format common invoice to fill page?
                jrenfrew

                Open a new window - keeps the found set

                GoTo this record only

                Preview

                 

                When done

                Close window and you are back exactly where you started....

                • 5. Re: Format common invoice to fill page?
                  JeffJ

                  You have been a lifesaver here, thanks so much. Your post showed me a technique I was not aware of; that found sets are window specific. I know that will be useful going forward. I wonder if I could trouble you for a bit of info on using scripting to isolate a record or set of records. Currently I use a three or four step process wherein I script to

                  go to a layout

                  enter find mode

                  set field to search term/variable

                  perform find

                   

                  I often use a capture error routine and handle the issue of not finding any matches but I have not been successful in using the restore capabilities of the enter find mode or perform find. Can you offer a more streamlined way of isolating a record or set of records than what I have described here? Thanks again

                  • 6. Re: Format common invoice to fill page?
                    jrenfrew

                    It depends exactly how you define unique record numbers and whether you want to do this on more than one table

                     

                    1. Go to a field with a unique value, copy, enter find mode, paste, perform find. Not my favourite in the ugliness stakes but works

                    2. Set a variable to the uniqueID field, perform find (or constrain) with restore, and set the criteria to the field = $variable. Problem with this it is not that portable

                    3. Set a variable to Get (filename) and another to the field value. Enter find mode Setfieldbyname to the $value, perform find. That way you can also trap for errors, but in this case there should be none as you took the values from a record right in front of you. You could also do contrain found set rather than a fresh find as the record you are looking for is in the found set.

                     

                    hope this helps