11 Replies Latest reply on Feb 4, 2011 9:55 AM by DanielClark

    Print Form Creation help

    DanielClark

      Title

      Print Form Creation help

      Post

      I am trying to create a print form for my Purchase Orders. I have been using the built in Invoices starting solution as a guide however, things don't quite work out so well for my solution. So I have a Purchase Orders table, and a Line Items table. The Line Items table is a portal in my Purchase Orders layout - pretty much exactly like the Invoices solution. I copied their solution in making a print form for my PO's as well, by linking a PO-Print layout that I made to the Line Items table. And then basically copying the way they did that as well, by making a basic header that pulls things like shipping addresses and customer information from the PO - putting the actual Line items in the body - which is about the width of the fields put into it so it looks like a nice list - and then putting my totals in the Trailing Grand Summary Part. Now with all of this - I have run into a few issues:

      1) My PO Total field (as well as any other fields) are not displaying any information when theyre in the Trailing Grand Summary or the Header Part of the layout . However, when I move them to the Body Part of the Layout, all of a sudden, I can see the information that the fields should be pulling. But I want the Totals and other information to be down at the bottom of the form, in the Trailing Grand Summary Part (like it is in the Invoices). Why is their solution working and mine not? What gives here? How can I fix it?

      2) Another thing is I noticed that if I make another PO, and have Line Items to that, and go back and check the PO-Print Layout, it just adds all the Line Items together for 1 giant PO as oppose to separating them out for different PO's. How does the Invoice solution work to show only the items from the PO going to this layout (being printed)?

        • 1. Re: Print Form Creation help
          philmodjunk

          All your issues appear to be connected to the same issue:

          When you use a line item based layout like this, you need to first perform a find to find only the line items that belong to the invoice you want to print. That's how the invoices starter solution does it. Typically, such a script starts from the Invoices layout, puts the current records InvoiceID number in a variable, then switches to the report layout and performs a find for all line items records with that invoice ID.

          That extra line 7 is an extra blank record that isn't part of the invoice you are trying to print. It might not be related to any invoice--which could interfere with your efforts to include data from the related invoice record as it isn't related to any invoice record. (Depending on the layout part, related data will display based on the data in either the first or last record in your found set.)

          • 2. Re: Print Form Creation help
            DanielClark

            Ah that was exactly it! I am having formatting problems though. I am making my Layout divided into three parts, like the solution: Header, Body, Trailing Grand Summary.

            How do I set up my solution so that I always have my signature and notes section of the PO always a 1/2" above the bottom of the page in my Trailing Grand Summary section?

            I have been having trouble in sizing the whole thing to fit an 8.5x11 sheet of paper as well - I'm looking at my layout (I have rulers turned on) and when I drag the bottom to 11", or even a little shorter, Filemaker is telling me the page is too long. But when I drag the end up to like 9.8", it finally gives and says it can now fit on one page. How does that make sense?

            And finally, if I have like 40 PO Line items, how do I get it so that the Line Items continue onto a second page (or more if necessary) - and on the last page, have my signature and notes fields still be a 1/2" from the bottom of the (last) page?

            Thanks again.

            • 3. Re: Print Form Creation help
              philmodjunk

              How do I set up my solution so that I always have my signature and notes section of the PO always a 1/2" above the bottom of the page in my Trailing Grand Summary section?
              You can't with a trailing Grand Summary. This part is designed to be located immediately after the last record.

              I have been having trouble in sizing the whole thing to fit an 8.5x11 sheet of paper as well - I'm looking at my layout (I have rulers turned on) and when I drag the bottom to 11", or even a little shorter, Filemaker is telling me the page is too long. But when I drag the end up to like 9.8", it finally gives and says it can now fit on one page. How does that make sense?

              Perhaps because you have a very large trailing grand summary due to trying to get that signature line at the bottom of the last page? FileMaker will add up the height of the header, body, trailing grand summary and compare that to the current "printable area" size for one page. That Printable area is determined by the current printer settings (page size and orientation), how close that printer can print to the edge of the page and any layout margin settings you have specified in Layout Setup...

              And finally, if I have like 40 PO Line items, how do I get it so that the Line Items continue onto a second page (or more if necessary) - and on the last page, have my signature and notes fields still be a 1/2" from the bottom of the (last) page?

              If you won't have any invoices that are more than 2 pages long, you can specify a blank title footer and place this info in the regular footer. If 3 or more pages are possible, there are no really clean solutions. I did find that I could place items in the footer and use conditional formatting or other visibility control tricks to hide items unless get ( FoundCount ) = Get ( RecordNumber). I still had to allow for the footer's blank space on every page, but the objects were visible only on the last page.

              • 4. Re: Print Form Creation help
                DanielClark

                Ok its not really a big deal - very rarely do we have more than one page PO's  - thanks again!

                • 5. Re: Print Form Creation help
                  DanielClark

                  One more question - how do I add a fourth part to my print layout - like there are only 3 sections by default that you can change and define, right now mine are: header, body, and trailing grand summary. I want to add a footer with a page number thing. How do I add the footer with a page number indicator?

                  • 6. Re: Print Form Creation help
                    philmodjunk

                    You can add the footer and other layout parts in Part Setup... (select from Layouts menu while in layout mode). From the insert menu you can then select Insert Page Number symbol.

                    • 7. Re: Print Form Creation help
                      DanielClark

                      For some reason, the page number symbol is just giving me a question mark? Why is that - I want it to be able to display the page number in a format like Page 1 of 3 (where 3 is the total amount of pages) - for example - how would I do that?

                      • 8. Re: Print Form Creation help
                        philmodjunk

                        It should return the page number when you preview or print the layout. Check it in Preview mode.

                        Page 1 of 3 can only be done with a script as far as I know.

                        Define a global variable (Use a global field for FileMaker 10 and older), $$TotalPages.

                        Put the following text in your footer:

                        Page ## of <<$$TotalPages>>

                        Use this script to compute the total pages:

                        Enter Preview Mode[]
                        Go To Record/Request/Page [last]
                        Set Variable [$$TotalPages ; value: Get ( PageNumber ) ]

                        • 9. Re: Print Form Creation help
                          DanielClark

                          Ahhhh - almost - How do I get the page number to display as an integer? Right now its saying like "Page 1 of 3.0" - and then I'll be perfect - thanks again!

                          • 10. Re: Print Form Creation help
                            philmodjunk

                            Looks like a previous number field was formatted as a decimal with one decimal place and this setting has become the default.

                            1. Enter Layout Mode
                            2. Select the text.
                            3. Use Data formatting from the data tab of the inspector to change the formating back to "as entered".
                            • 11. Re: Print Form Creation help
                              DanielClark

                              Awesome thanks again