5 Replies Latest reply on Apr 27, 2011 1:37 AM by MikeDunglinson

    page number "##"

    MikeDunglinson

      Title

      page number "##"

      Post

      Filemaker pro 10 windows 7

      I am page numbering invoices in that if an invoice has more lines that will fit on one page I allow the body of the page to break across pages and they are numberd 2,3,4 etc using the "##" symbol . I then reset the page number to 1 so all invoices have a page number of 1 unless they continue over more than one page and then a sequential number is printed using the symbol "##".

      My question is

      I am trying to apply a conditional formula to the words "continuation invoice" based on the value of "##" This will print the words in black on the 2nd and subsequent invoice pages but when the value of ## is 1 the words are printed in white making them invisible. This is not working and when I try the function get(page number) this does not work either as it gets the actual filemaker page number not the value of "##". I am completley stumped over such a simple ask and I would be very grateful if anyone could help

      Many Thanks

      Mike

       

        • 1. Re: page number "##"
          philmodjunk

          Not sure what you mean by:

          "I then reset the page number to 1..."

          Are you using a "restart page numbers after every occurrence" setting in a layout part and printing more than one invoice at a time?

          • 2. Re: page number "##"
            MikeDunglinson

            Philmodjunk

            sorry for the lack of info but yes that is exactly what I am doing and it all works fine. For example with a 3 page invoice I get page numbering 1 to 3 then on the next sequential invoice the page numbering starts at 1 again. I would just like to print "continuation invoice" in the header of invoices which go over 1 page.

             

            My layout is Header, subsummary(leading) sorted by invoice number, Body, subsumary(trailing) for the invoice totals and footer.

            How can I pick up the page number in order to set the text color on my "continuation invoice" phrase  ??

             

            many thanks

             

            mike

             

            • 3. Re: page number "##"
              philmodjunk

              If you just printed one invoice at a time, it would be easy. You might consider a print script that loops through your invoices and prints each one out individually to avoid this issue as there's no function built in that will get you the correct page number and any calculation that we might come up with could be very tricky to define here.

              Hmm, just got an idea. Try this expression to make the text visible:

              GetNthRecord ( YourTable::InvoiceId ; Get (RecordNumber ) - 1 ) = YourTable::InvoiceID

              This will only be true if the previous record was from the same invoice so I think it'll work here.

              • 4. Re: page number "##"
                MikeDunglinson

                Got ya match the last record on the next page to the previous page if no match then its a new invoice and not a continuation if I read you right

                clever i will try it. Looks good

                Not worked with expressions but I am sure this is possible to do. Nice to know I did not miss anything "easy"

                I can always fall back on the script loop but better not have to many unecessary scripts if poss especially for such a small thing

                 

                Many Thanks

                 

                mike

                 

                • 5. Re: page number "##"
                  MikeDunglinson

                   

                  Philmodjunk

                  GetNthRecord ( YourTable::InvoiceId ; Get (RecordNumber ) - 1 ) = YourTable::InvoiceID

                  Thanks so much that expression works perfectly job done

                  once again many thanks

                   

                  Mike