5 Replies Latest reply on Sep 22, 2010 8:57 AM by HowardRathbun

    How to print odd numbered pages

    HowardRathbun

      Title

      How to print odd numbered pages

      Post

      I want to print a long report on both sides of the paper.  In MSAccess I printed all the odd-numbered pages first, reinserted the results, and then printed the even-numbered pages.  It took a script to do that but it worked just fine.  I am willing to write a script in FM to do this but I can't see how to make the print command print only page x where 'x' is a variable that I can set in the script, eg in a for-next loop.

      Any help will be appreciated.  PS: I am a newbie to Filemaker.

        • 1. Re: How to print odd numbered pages
          philmodjunk

          Is the number of records that fit on a page always the same, or do you use sliding and thus have a variable number of records per page?

          • 2. Re: How to print odd numbered pages
            HowardRathbun

            I have the same number of records on each page except for the last page which usually has less.  In other words I don't use sliding - there is no need to do that.  In other words, if I have 365 records and print 60 per page, the last page would only have 5.

            • 3. Re: How to print odd numbered pages
              sunmoonstar.13

              I'm not aware of any function or setting within FMP that will allow you to print odd/even pages. 

              A workaround would be to save your report as a PDF and then print the PDF. The Adobe Reader print dialog has an option for printing odd/even pages.

               

              Nick

               

              • 4. Re: How to print odd numbered pages
                philmodjunk

                Many printer drivers provide a duplex printing option and this would be the easiest way to do what you want. If you don't have that option for your printer and given that you have a predictable number of records per page, you can use a script to Mark all records for odd numbered pages and all records for even numbered pages. Your script can then find all records marked for odd numbered pages, print them and then find all the even numbered page records and print them.

                Define an extra number field in your report's main table, PageSet.

                #Do steps needed to find and sort your records for your report
                Set Variable [$PageSize ; Value : 5 ] // 5 records per page, choose the value you need for your report here
                Replace Field Contents [ No dialog ; ReportTable::PageSet ; Mod ( Ceiling ( Get ( RecordNumber ) / $PageSize ) ) ; 2 ) ]
                #Repeat steps to find and sort your records but also specify a 1 in PageSet to find just the records for odd numbered pages
                Print
                Pause/Resume
                #Repeat steps to find and sort your records but also specify a 0 in PageSet to find just the records for even numbered pages
                Print
                #Find all your report records one last time
                Replace [No Dialog ; ReportTable::PageSet ; "" ] //Clear the flag field so it won't mess up your next report

                • 5. Re: How to print odd numbered pages
                  HowardRathbun

                  Nick,  I tried the pdf via Adobe route and that works fine.  A little combersome but for the occasional printing of a long report that would be OK.

                  PhilModjunk:  your solution looks like it will do the job, but it will take me a few days before I can try it out.  My printer driver (for an HP C4460 running on a Mac) apparently does not have the duplex printing option.  If I can find a printer driver that does, then I agree that would be the best of all worlds.